Documentation
¶
Overview ¶
Copyright © 2019 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Portworx ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Portworx ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func AddCommonLogOptions(lc *cobra.Command)
- func FillContainerInfo(vols []*api.Volume, cliOps CliOps, lo *kubernetes.COpsLogOptions, allLogs bool) error
- func GetCliAlertInputs(cmd *cobra.Command, args []string) *portworx.CliAlertInputs
- func GetCliAuthInputs(cmd *cobra.Command, args []string) *portworx.CliAuthInputs
- func GetCommonLogOptions(cmd *cobra.Command) (*kubernetes.COpsLogOptions, error)
- func GetRequiredPortworxPods(cliOps CliOps, nodeNames []string, portworxNamespace string) ([]kubernetes.ContainerInfo, error)
- func ValidateCliInput(cmd *cobra.Command, args []string) error
- type CliAlertOps
- type CliAuthOps
- type CliInputs
- type CliOps
Constants ¶
const (
PORTWORX_CONTAINER_NAME = "portworx"
)
Variables ¶
This section is empty.
Functions ¶
func AddCommonLogOptions ¶
func FillContainerInfo ¶
func FillContainerInfo( vols []*api.Volume, cliOps CliOps, lo *kubernetes.COpsLogOptions, allLogs bool, ) error
This method looks at each of the volumes and figures out a) Which nodes the volume has relevance to such as where its replicas
are and where the node is attached
b) Converts the node names to appropriate portworx pods c) Figures out which pods are using this volume and which of the
containers inside those pods use the volume
Figures out all the unique namespace, pod and container combinations and returns those
func GetCliAlertInputs ¶ added in v0.22.0
func GetCliAlertInputs(cmd *cobra.Command, args []string) *portworx.CliAlertInputs
func GetCliAuthInputs ¶ added in v0.31.1
func GetCliAuthInputs(cmd *cobra.Command, args []string) *portworx.CliAuthInputs
GetCliAuthInputs gets all CLI auth inputs
func GetCommonLogOptions ¶
func GetCommonLogOptions(cmd *cobra.Command) (*kubernetes.COpsLogOptions, error)
func GetRequiredPortworxPods ¶
func GetRequiredPortworxPods( cliOps CliOps, nodeNames []string, portworxNamespace string, ) ([]kubernetes.ContainerInfo, error)
From the given lot of nodeName, figures out the Portworx pods on those nodes
Types ¶
type CliAlertOps ¶ added in v0.22.0
type CliAlertOps struct { portworx.CliAlertInputs PxAlertOps portworx.PxAlertOps }
func NewCliAlertOps ¶ added in v0.22.0
func NewCliAlertOps( cvi *portworx.CliAlertInputs, ) *CliAlertOps
Create a new cliAlertOps object
type CliAuthOps ¶ added in v0.31.1
type CliAuthOps struct { portworx.CliAuthInputs AuthOps portworx.AuthOps }
CliAuthOps represents an interface for auth commands
func NewCliAuthOps ¶ added in v0.31.1
func NewCliAuthOps( cvi *portworx.CliAuthInputs, ) *CliAuthOps
NewCliAuthOps creates a new cliAuthOps object
type CliInputs ¶ added in v0.22.0
type CliOps ¶ added in v0.22.0
type CliOps interface { // Connect creates connections to portworx and if needed to k8s Connect() error // Close connections to portworx and k8s Close() // CliInputs returns the CliInputs CliInputs() *CliInputs // PxOps returns the portwor connection object PxOps() portworx.PxOps // COps returns the k8s connection object COps() kubernetes.COps }