Documentation ¶
Index ¶
- func CreateSecret(client teiidclient.Client, name, namespace string, owner metav1.Object, ...) error
- func EnsureObject(obj v1alpha1.OpenShiftObject, err error, client k8sclient.Writer) error
- func EnvironmentPropertiesExists(ctx context.Context, client k8sclient.Reader, namespace string, ...) bool
- func GetConfigMap(context context.Context, client k8sclient.Reader, name string, ...) (*corev1.ConfigMap, error)
- func GetConfigMapRefValue(ctx context.Context, client k8sclient.Reader, namespace string, ...) (string, error)
- func GetSecret(context context.Context, client k8sclient.Reader, name string, ...) (*corev1.Secret, error)
- func GetSecretRefValue(ctx context.Context, client k8sclient.Reader, namespace string, ...) (string, error)
- func GetService(context context.Context, client k8sclient.Reader, name string, ...) (*corev1.Service, error)
- func HasConfigMap(context context.Context, client k8sclient.Reader, name string, ...) bool
- func HasSecret(context context.Context, client k8sclient.Reader, name string, ...) bool
- func HasServerGroup(client kubernetes.Interface, groupName string) bool
- func IsOpenshift(client kubernetes.Interface) bool
- func JSONToYAML(src []byte) ([]byte, error)
- func ResolveValueSource(ctx context.Context, client k8sclient.Reader, namespace string, ...) (string, error)
- func RevisionOfConfigMapOrSecret(ctx context.Context, client k8sclient.Reader, namespace string, ...) (string, error)
- func ToJSON(value runtime.Object) ([]byte, error)
- func ToYAML(value runtime.Object) ([]byte, error)
- func ValidateEnvironmentPropertyNames(envs []corev1.EnvVar) error
- type ResourceInterface
- type ResourceObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSecret ¶
func CreateSecret(client teiidclient.Client, name, namespace string, owner metav1.Object, data map[string][]byte) error
CreateSecret --
func EnsureObject ¶
EnsureObject creates an object based on the error passed in from a `client.Get`
func EnvironmentPropertiesExists ¶
func EnvironmentPropertiesExists(ctx context.Context, client k8sclient.Reader, namespace string, envs []corev1.EnvVar) bool
EnvironmentPropertiesExists --
func GetConfigMap ¶
func GetConfigMap(context context.Context, client k8sclient.Reader, name string, namespace string) (*corev1.ConfigMap, error)
GetConfigMap --
func GetConfigMapRefValue ¶
func GetConfigMapRefValue(ctx context.Context, client k8sclient.Reader, namespace string, selector *corev1.ConfigMapKeySelector) (string, error)
GetConfigMapRefValue returns the value of a configmap in the supplied namespace
func GetSecret ¶
func GetSecret(context context.Context, client k8sclient.Reader, name string, namespace string) (*corev1.Secret, error)
GetSecret --
func GetSecretRefValue ¶
func GetSecretRefValue(ctx context.Context, client k8sclient.Reader, namespace string, selector *corev1.SecretKeySelector) (string, error)
GetSecretRefValue returns the value of a secret in the supplied namespace --
func GetService ¶
func GetService(context context.Context, client k8sclient.Reader, name string, namespace string) (*corev1.Service, error)
GetService --
func HasConfigMap ¶
func HasConfigMap(context context.Context, client k8sclient.Reader, name string, namespace string) bool
HasConfigMap --
func HasSecret ¶
func HasSecret(context context.Context, client k8sclient.Reader, name string, namespace string) bool
HasSecret --
func HasServerGroup ¶
func HasServerGroup(client kubernetes.Interface, groupName string) bool
HasServerGroup detects if the given api group is supported by the server
func IsOpenshift ¶
func IsOpenshift(client kubernetes.Interface) bool
IsOpenshift detects if the application is running on OpenShift or not
func ResolveValueSource ¶
func ResolveValueSource(ctx context.Context, client k8sclient.Reader, namespace string, valueSource *v1alpha1.ValueSource) (string, error)
ResolveValueSource --
func RevisionOfConfigMapOrSecret ¶
func RevisionOfConfigMapOrSecret(ctx context.Context, client k8sclient.Reader, namespace string, env corev1.EnvVar) (string, error)
RevisionOfConfigMapOrSecret --
func ValidateEnvironmentPropertyNames ¶
ValidateEnvironmentPropertyNames --
Types ¶
type ResourceInterface ¶
type ResourceInterface interface { // Create creates a new Kubernetes object in the cluster. // Note that no checks will be performed in the cluster. If you're not sure, use CreateIfNotExists. Create(resource ResourceObject) error // CreateIfNotExists will fetch for the object resource in the Kubernetes cluster, if not exists, will create it. CreateIfNotExists(resource ResourceObject) (exists bool, err error) // FetchWithKey fetches and binds a resource from the Kubernetes cluster with the defined key. If not exists, returns false. FetchWithKey(key types.NamespacedName, resource ResourceObject) (exists bool, err error) // Fetch fetches and binds a resource with given name and namespace from the Kubernetes cluster. If not exists, returns false. Fetch(resource ResourceObject) (exists bool, err error) // ListWithNamespace fetches and binds a list resource from the Kubernetes cluster with the defined namespace. ListWithNamespace(namespace string, list runtime.Object) error // ListWithNamespaceAndLabel same as ListWithNamespace, but also limit the query scope by the given labels ListWithNamespaceAndLabel(namespace string, list runtime.Object, labels map[string]string) error Delete(resource ResourceObject) error // UpdateStatus update the given object status UpdateStatus(resource ResourceObject) error // Update the given object Update(resource ResourceObject) error }
ResourceInterface has functions that interacts with any resource object in the Kubernetes cluster