Documentation ¶
Index ¶
- Variables
- func ApplyMetaOptions(obj metav1.Object, opts ...MetaOptions) error
- func CreateNamespace(cli client.Client, namespace string, metaOptions ...MetaOptions) (*corev1.Namespace, error)
- func CreateOrUpdateConfigMap(c client.Client, desiredCfgMap *corev1.ConfigMap, metaOptions ...MetaOptions) error
- func CreateSecret(cli client.Client, name, namespace string, metaOptions ...MetaOptions) error
- func GetClusterServiceVersion(ctx context.Context, c client.Client, watchNameSpace string) (*ofapi.ClusterServiceVersion, error)
- func GetDomain(c client.Client) (string, error)
- func GetOperatorNamespace() (string, error)
- func UpdatePodSecurityRolebinding(cli client.Client, namespace string, serviceAccountsList ...string) error
- type MetaOptions
Constants ¶
This section is empty.
Variables ¶
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 GetOperatorNamespace ¶ added in v2.10.0
Types ¶
type MetaOptions ¶ added in v2.7.0
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