Documentation ¶
Index ¶
- Constants
- Variables
- func AddFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, ...) error
- func CopyDefaultPullSecretToNameSpace(context context.Context, destNamespace, destName string, ...) error
- func CopySecret(ctx context.Context, client k8sclient.Client, ...) error
- func CreateNSWithProjectRequest(ctx context.Context, namespace string, client k8sclient.Client, ...) (*v1.Namespace, error)
- func CreateOrUpdate(ctx context.Context, serverClient k8sclient.Client, obj runtime.Object) error
- func CreatePostgresAvailabilityAlert(ctx context.Context, client k8sclient.Client, inst *v1alpha1.RHMI, ...) (*prometheusv1.PrometheusRule, error)
- func CreateRedisAvailabilityAlert(ctx context.Context, client k8sclient.Client, inst *v1alpha1.RHMI, ...) (*prometheusv1.PrometheusRule, error)
- func Exists(ctx context.Context, serverClient k8sclient.Client, obj runtime.Object) (bool, error)
- func GetNS(ctx context.Context, namespace string, client k8sclient.Client) (*corev1.Namespace, error)
- func IsOwnedBy(o metav1.Object, owner *integreatlyv1alpha1.RHMI) bool
- func LoadKubernetesResource(jsonData []byte, namespace string) (runtime.Object, error)
- func PrepareObject(ns metav1.Object, install *integreatlyv1alpha1.RHMI)
- func ReconcileBackup(ctx context.Context, serverClient k8sclient.Client, config BackupConfig, ...) error
- func ReconcileRHSSOPostgresCredentials(ctx context.Context, installation *integreatlyv1alpha1.RHMI, ...) (*corev1.Secret, error)
- func RemoveFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, ...) error
- func RemoveNamespace(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, ...) (integreatlyv1alpha1.StatusPhase, error)
- func RemoveOauthClient(oauthClient oauthClient.OauthV1Interface, oauthClientName string) error
- func RemoveProductFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, ...) error
- func RuntimeObjectFromUnstructured(u *unstructured.Unstructured) (runtime.Object, error)
- func UnstructuredFromRuntimeObject(ro runtime.Object) (*unstructured.Unstructured, error)
- type BackupComponent
- type BackupConfig
- type BackupSecretLocation
- type OauthResolver
- type OauthServerConfig
- type Reconciler
- func (r *Reconciler) ReconcileFinalizer(ctx context.Context, client k8sclient.Client, inst *integreatlyv1alpha1.RHMI, ...) (integreatlyv1alpha1.StatusPhase, error)
- func (r *Reconciler) ReconcileNamespace(ctx context.Context, namespace string, inst *integreatlyv1alpha1.RHMI, ...) (integreatlyv1alpha1.StatusPhase, error)
- func (r *Reconciler) ReconcileOauthClient(ctx context.Context, inst *integreatlyv1alpha1.RHMI, ...) (integreatlyv1alpha1.StatusPhase, error)
- func (r *Reconciler) ReconcilePullSecret(ctx context.Context, namespace, secretName string, ...) (integreatlyv1alpha1.StatusPhase, error)
- func (r *Reconciler) ReconcileSubscription(ctx context.Context, owner ownerutil.Owner, target marketplace.Target, ...) (integreatlyv1alpha1.StatusPhase, error)
- type Version
Constants ¶
const ( DefaultOriginPullSecretName = "samples-registry-credentials" DefaultOriginPullSecretNamespace = "openshift" )
Variables ¶
var ( BackupServiceAccountName = "rhmi-backupjob" BackupRoleName = "rhmi-backupjob" BackupRoleBindingName = "rhmi-backupjob" )
var (
OwnerLabelKey = integreatlyv1alpha1.SchemeGroupVersion.Group + "/installation-uid"
)
var (
Scheme = scheme.Scheme
)
Functions ¶
func AddFinalizer ¶
func AddFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, finalizer string) error
AddFinalizer adds a finalizer to the custom resource. This allows us to clean up oauth clients and other cluster level objects owned by the installation before the cr is deleted
func CopyDefaultPullSecretToNameSpace ¶
func CopyDefaultPullSecretToNameSpace(context context.Context, destNamespace, destName string, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client) error
CopyDefaultPullSecretToNamespace copies the default pull secret to a target namespace
func CopySecret ¶
func CopySecret(ctx context.Context, client k8sclient.Client, srcName, srcNamespace, destName, destNamespace string) error
CopySecret will copy or update the destination secret from the source secret
func CreateOrUpdate ¶
func CreatePostgresAvailabilityAlert ¶
func CreatePostgresAvailabilityAlert(ctx context.Context, client k8sclient.Client, inst *v1alpha1.RHMI, cr *crov1.Postgres) (*prometheusv1.PrometheusRule, error)
CreatePostgresAvailabilityAlert creates a PrometheusRule alert to watch for the availability of a Postgres instance
func CreateRedisAvailabilityAlert ¶
func CreateRedisAvailabilityAlert(ctx context.Context, client k8sclient.Client, inst *v1alpha1.RHMI, cr *crov1.Redis) (*prometheusv1.PrometheusRule, error)
CreateRedisAvailabilityAlert creates a PrometheusRule alert to watch for the availability of a Redis cacheu
func GetNS ¶
func GetNS(ctx context.Context, namespace string, client k8sclient.Client) (*corev1.Namespace, error)
GetNS gets the specified corev1.Namespace from the k8s API server
func LoadKubernetesResource ¶
func PrepareObject ¶
func PrepareObject(ns metav1.Object, install *integreatlyv1alpha1.RHMI)
func ReconcileBackup ¶
func ReconcileBackup(ctx context.Context, serverClient k8sclient.Client, config BackupConfig, configManager productsConfig.ConfigReadWriter) error
func ReconcileRHSSOPostgresCredentials ¶
func ReconcileRHSSOPostgresCredentials(ctx context.Context, installation *integreatlyv1alpha1.RHMI, serverClient k8sclient.Client, name, ns string) (*corev1.Secret, error)
ReconcileRHSSOPostgresCredentials Provisions postgres and creates external database secret based on Installation CR, secret will be nil while the postgres instance is provisioning
func RemoveFinalizer ¶
func RemoveFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, finalizer string) error
RemoveFinalizer removes a given finalizer from the installation custom resource
func RemoveNamespace ¶
func RemoveNamespace(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, namespace string) (integreatlyv1alpha1.StatusPhase, error)
RemoveNamespace deletes a namespace of a product
func RemoveOauthClient ¶
func RemoveOauthClient(oauthClient oauthClient.OauthV1Interface, oauthClientName string) error
RemoveOauthClient deletes an oauth client by name
func RemoveProductFinalizer ¶
func RemoveProductFinalizer(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client, product string) error
RemoveProductFinalizer removes a given finalizer from the installation custom resource
func RuntimeObjectFromUnstructured ¶
func RuntimeObjectFromUnstructured(u *unstructured.Unstructured) (runtime.Object, error)
func UnstructuredFromRuntimeObject ¶
func UnstructuredFromRuntimeObject(ro runtime.Object) (*unstructured.Unstructured, error)
Types ¶
type BackupComponent ¶
type BackupComponent struct { Name string Type string Secret BackupSecretLocation Schedule string }
type BackupConfig ¶
type BackupConfig struct { Name string Namespace string Components []BackupComponent BackendSecret BackupSecretLocation EncryptionSecret BackupSecretLocation }
type BackupSecretLocation ¶
type OauthResolver ¶
type OauthResolver struct { Host string // contains filtered or unexported fields }
func NewOauthResolver ¶
func NewOauthResolver(client *http.Client) *OauthResolver
func (*OauthResolver) GetOauthEndPoint ¶
func (or *OauthResolver) GetOauthEndPoint() (*OauthServerConfig, error)
type OauthServerConfig ¶
type OauthServerConfig struct { Issuer string `json:"issuer"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` ScopesSupported []string `json:"scopes_supported"` ResponseTypesSupported []string `json:"response_types_supported"` GrantTypesSupported []string `json:"grant_types_supported"` CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"` }
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
func NewReconciler ¶
func NewReconciler(mpm marketplace.MarketplaceInterface) *Reconciler
func (*Reconciler) ReconcileFinalizer ¶
func (r *Reconciler) ReconcileFinalizer(ctx context.Context, client k8sclient.Client, inst *integreatlyv1alpha1.RHMI, productName string, finalFunc finalizerFunc) (integreatlyv1alpha1.StatusPhase, error)
func (*Reconciler) ReconcileNamespace ¶
func (r *Reconciler) ReconcileNamespace(ctx context.Context, namespace string, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client) (integreatlyv1alpha1.StatusPhase, error)
func (*Reconciler) ReconcileOauthClient ¶
func (r *Reconciler) ReconcileOauthClient(ctx context.Context, inst *integreatlyv1alpha1.RHMI, client *oauthv1.OAuthClient, apiClient k8sclient.Client) (integreatlyv1alpha1.StatusPhase, error)
func (*Reconciler) ReconcilePullSecret ¶
func (r *Reconciler) ReconcilePullSecret(ctx context.Context, namespace, secretName string, inst *integreatlyv1alpha1.RHMI, client k8sclient.Client) (integreatlyv1alpha1.StatusPhase, error)
func (*Reconciler) ReconcileSubscription ¶
func (r *Reconciler) ReconcileSubscription(ctx context.Context, owner ownerutil.Owner, target marketplace.Target, operandNS []string, client k8sclient.Client) (integreatlyv1alpha1.StatusPhase, error)
type Version ¶
func NewVersion ¶
func NewVersion(version integreatlyv1alpha1.OperatorVersion) (*Version, error)