Documentation ¶
Overview ¶
Package k8sutil for Kubernetes helpers.
Package k8sutil for Kubernetes helpers.
Package k8sutil for Kubernetes helpers.
Package k8sutil for Kubernetes helpers.
Package k8sutil for Kubernetes helpers.
Package k8sutil for Kubernetes helpers.
Index ¶
- Constants
- func ConfigDirEnvVar() v1.EnvVar
- func ConfigOverrideEnvVar() v1.EnvVar
- func ConfigOverrideMount() v1.VolumeMount
- func ConfigOverrideVolume() v1.Volume
- func DeleteDaemonset(clientset kubernetes.Interface, namespace, name string) error
- func DeleteDeployment(clientset kubernetes.Interface, namespace, name string) error
- func GetContainerImage(clientset kubernetes.Interface) (string, error)
- func GetK8SVersion(clientset kubernetes.Interface) (*version.Version, error)
- func MakeClusterRole(clientset kubernetes.Interface, namespace, name string, ...) error
- func MakeRole(clientset kubernetes.Interface, namespace, name string, ...) error
- func MakeRookImage(version string) string
- func MergeResourceRequirements(first, second v1.ResourceRequirements) v1.ResourceRequirements
- func NameEnvVar() v1.EnvVar
- func NamespaceEnvVar() v1.EnvVar
- func NodeConfigURI() (string, error)
- func NodeEnvVar() v1.EnvVar
- func PathToVolumeName(path string) string
- func PodIPEnvVar(property string) v1.EnvVar
- type ConfigMapKVStore
Constants ¶
const ( // Namespace for rook Namespace = "rook" // DefaultNamespace for the cluster DefaultNamespace = "default" // DataDirVolume data dir volume DataDirVolume = "rook-data" // DataDir folder DataDir = "/var/lib/rook" // RookType for the CRD RookType = "kubernetes.io/rook" // PodNameEnvVar is the env variable for getting the pod name via downward api PodNameEnvVar = "POD_NAME" // PodNamespaceEnvVar is the env variable for getting the pod namespace via downward api PodNamespaceEnvVar = "POD_NAMESPACE" // NodeNameEnvVar is the env variable for getting the node via downward api NodeNameEnvVar = "NODE_NAME" // FirstCRDVersion is the first K8s version with CRDs to replace TPRs FirstCRDVersion = "v1.7.0" )
const ( // AppAttr app label AppAttr = "app" // ClusterAttr cluster label ClusterAttr = "rook_cluster" // PublicIPEnvVar public IP env var PublicIPEnvVar = "ROOK_PUBLIC_IPV4" // PrivateIPEnvVar pod IP env var PrivateIPEnvVar = "ROOK_PRIVATE_IPV4" // DefaultRepoPrefix repo prefix DefaultRepoPrefix = "rook" // ConfigOverrideName config override name ConfigOverrideName = "rook-config-override" // ConfigOverrideVal config override value ConfigOverrideVal = "config" )
Variables ¶
This section is empty.
Functions ¶
func ConfigDirEnvVar ¶ added in v0.4.0
ConfigDirEnvVar config dir env var
func ConfigOverrideEnvVar ¶ added in v0.5.0
ConfigOverrideEnvVar config override env var
func ConfigOverrideMount ¶ added in v0.5.0
func ConfigOverrideMount() v1.VolumeMount
ConfigOverrideMount is an override mount
func ConfigOverrideVolume ¶ added in v0.5.0
ConfigOverrideVolume is an override volume
func DeleteDaemonset ¶ added in v0.6.0
func DeleteDaemonset(clientset kubernetes.Interface, namespace, name string) error
DeleteDaemonset makes a best effort at deleting a daemonset and its pods, then waits for them to be deleted
func DeleteDeployment ¶ added in v0.6.0
func DeleteDeployment(clientset kubernetes.Interface, namespace, name string) error
DeleteDeployment makes a best effort at deleting a deployment and its pods, then waits for them to be deleted
func GetContainerImage ¶ added in v0.7.0
func GetContainerImage(clientset kubernetes.Interface) (string, error)
func GetK8SVersion ¶ added in v0.6.0
func GetK8SVersion(clientset kubernetes.Interface) (*version.Version, error)
GetK8SVersion gets the version of the running K8S cluster
func MakeClusterRole ¶ added in v0.6.0
func MakeClusterRole(clientset kubernetes.Interface, namespace, name string, rules []v1beta1.PolicyRule, ownerRef *metav1.OwnerReference) error
func MakeRole ¶ added in v0.6.0
func MakeRole(clientset kubernetes.Interface, namespace, name string, rules []v1beta1.PolicyRule, ownerRef metav1.OwnerReference) error
func MakeRookImage ¶
MakeRookImage formats the container name
func MergeResourceRequirements ¶ added in v0.7.0
func MergeResourceRequirements(first, second v1.ResourceRequirements) v1.ResourceRequirements
func NodeConfigURI ¶ added in v0.6.0
NodeConfigURI returns the node config URI path for this node
func PathToVolumeName ¶ added in v0.4.0
PathToVolumeName converts a path to a valid volume name
Types ¶
type ConfigMapKVStore ¶ added in v0.6.0
type ConfigMapKVStore struct {
// contains filtered or unexported fields
}
func NewConfigMapKVStore ¶ added in v0.6.0
func NewConfigMapKVStore(namespace string, clientset kubernetes.Interface, ownerRef metav1.OwnerReference) *ConfigMapKVStore
func (*ConfigMapKVStore) ClearStore ¶ added in v0.6.0
func (kv *ConfigMapKVStore) ClearStore(storeName string) error
func (*ConfigMapKVStore) GetStore ¶ added in v0.6.0
func (kv *ConfigMapKVStore) GetStore(storeName string) (map[string]string, error)
func (*ConfigMapKVStore) GetValue ¶ added in v0.6.0
func (kv *ConfigMapKVStore) GetValue(storeName, key string) (string, error)
func (*ConfigMapKVStore) SetValue ¶ added in v0.6.0
func (kv *ConfigMapKVStore) SetValue(storeName, key, value string) error