cluster

package
v2.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KnativeServingGVK = schema.GroupVersionKind{
		Group:   "operator.knative.dev",
		Version: "v1beta1",
		Kind:    "KnativeServing",
	}

	OpenshiftIngressGVK = schema.GroupVersionKind{
		Group:   "config.openshift.io",
		Version: "v1",
		Kind:    "Ingress",
	}

	ServiceMeshControlPlaneGVK = schema.GroupVersionKind{
		Group:   "maistra.io",
		Version: "v2",
		Kind:    "ServiceMeshControlPlane",
	}
)

Functions

func ApplyMetaOptions added in v2.10.0

func ApplyMetaOptions(obj metav1.Object, opts ...MetaOptions) error

func CreateNamespace

func CreateNamespace(cli client.Client, namespace string, metaOptions ...MetaOptions) (*corev1.Namespace, error)

CreateNamespace creates a namespace and apply metadata. If a namespace already exists, the operation has no effect on it.

func CreateOrUpdateConfigMap added in v2.10.1

func CreateOrUpdateConfigMap(c client.Client, desiredCfgMap *corev1.ConfigMap, metaOptions ...MetaOptions) error

CreateOrUpdateConfigMap creates a new configmap or updates an existing one. If the configmap already exists, it will be updated with the merged Data and MetaOptions, if any. ConfigMap.ObjectMeta.Name and ConfigMap.ObjectMeta.Namespace are both required, it returns an error otherwise.

func CreateSecret

func CreateSecret(cli client.Client, name, namespace string, metaOptions ...MetaOptions) error

CreateSecret creates secrets required by dashboard component in downstream.

func GetClusterServiceVersion added in v2.10.0

func GetClusterServiceVersion(ctx context.Context, c client.Client, watchNameSpace string) (*ofapi.ClusterServiceVersion, error)

GetClusterServiceVersion retries the clusterserviceversions available in the operator namespace.

func GetDomain added in v2.8.0

func GetDomain(c client.Client) (string, error)

func GetOperatorNamespace added in v2.10.0

func GetOperatorNamespace() (string, error)

func UpdatePodSecurityRolebinding

func UpdatePodSecurityRolebinding(cli client.Client, namespace string, serviceAccountsList ...string) error

UpdatePodSecurityRolebinding update default rolebinding which is created in applications namespace by manifests being used by different components.

Types

type MetaOptions added in v2.7.0

type MetaOptions func(obj metav1.Object) error

MetaOptions allows to add additional settings for the object being created through a chain of functions which are applied on metav1.Object before actual resource creation.

func OwnedBy added in v2.11.0

func OwnedBy(owner metav1.Object, scheme *runtime.Scheme) MetaOptions

func WithLabels added in v2.7.0

func WithLabels(labels ...string) MetaOptions

func WithOwnerReference added in v2.10.0

func WithOwnerReference(ownerReferences ...metav1.OwnerReference) MetaOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL