Documentation ¶
Index ¶
- Constants
- func AddCABundleConfigMapInAllNamespaces(ctx context.Context, cli client.Client, dscInit *dsci.DSCInitialization) error
- func ConfigureTrustedCABundle(ctx context.Context, cli client.Client, log logr.Logger, ...) error
- func CreateOdhTrustedCABundleConfigMap(ctx context.Context, cli client.Client, namespace string, customCAData string) error
- func DeleteOdhTrustedCABundleConfigMap(ctx context.Context, cli client.Client, namespace string) error
- func HasCABundleAnnotationDisabled(ns client.Object) bool
- func IsTrustedCABundleUpdated(ctx context.Context, cli client.Client, dscInit *dsci.DSCInitialization) (bool, error)
- func RemoveCABundleConfigMapInAllNamespaces(ctx context.Context, cli client.Client) *multierror.Error
- func ShouldInjectTrustedBundle(ns client.Object) bool
Constants ¶
const ( CAConfigMapName = "odh-trusted-ca-bundle" CADataFieldName = "odh-ca-bundle.crt" )
Variables ¶
This section is empty.
Functions ¶
func AddCABundleConfigMapInAllNamespaces ¶
func AddCABundleConfigMapInAllNamespaces(ctx context.Context, cli client.Client, dscInit *dsci.DSCInitialization) error
when DSCI TrustedCABundle.ManagementState is set to `Managed`.
func CreateOdhTrustedCABundleConfigMap ¶
func CreateOdhTrustedCABundleConfigMap(ctx context.Context, cli client.Client, namespace string, customCAData string) error
createOdhTrustedCABundleConfigMap creates a configMap 'odh-trusted-ca-bundle' in given namespace with labels and data or update existing odh-trusted-ca-bundle configmap if already exists with new content of .data.odh-ca-bundle.crt this is certificates for the cluster trusted CA Cert Bundle.
func HasCABundleAnnotationDisabled ¶
return true if namespace has annotation "security.opendatahub.io/inject-trusted-ca-bundle: false" return false if annotation is "true" or not set.
func IsTrustedCABundleUpdated ¶
func IsTrustedCABundleUpdated(ctx context.Context, cli client.Client, dscInit *dsci.DSCInitialization) (bool, error)
IsTrustedCABundleUpdated check if data in CM "odh-trusted-ca-bundle" from applciation namespace matches DSCI's TrustedCABundle.CustomCABundle return false when these two are matching => skip update return true when not match => need upate.
func RemoveCABundleConfigMapInAllNamespaces ¶
func RemoveCABundleConfigMapInAllNamespaces(ctx context.Context, cli client.Client) *multierror.Error
when DSCI TrustedCABundle.ManagementState is set to `Removed`.
Types ¶
This section is empty.