Documentation
¶
Index ¶
- func AppendIfNotSubstring(a, s string) string
- func BuildServiceBindingSecretName(name, namespace string) string
- func ContainsString(slice []string, s string) bool
- func CustomizeAffinity(a *corev1.Affinity, ba common.BaseApplication)
- func CustomizeConsumedServices(podSpec *corev1.PodSpec, ba common.BaseApplication)
- func CustomizeDeployment(deploy *appsv1.Deployment, ba common.BaseApplication)
- func CustomizeHPA(hpa *autoscalingv1.HorizontalPodAutoscaler, ba common.BaseApplication)
- func CustomizeKnativeService(ksvc *servingv1alpha1.Service, ba common.BaseApplication)
- func CustomizePersistence(statefulSet *appsv1.StatefulSet, ba common.BaseApplication)
- func CustomizePodSpec(pts *corev1.PodTemplateSpec, ba common.BaseApplication)
- func CustomizeRoute(route *routev1.Route, ba common.BaseApplication)
- func CustomizeService(svc *corev1.Service, ba common.BaseApplication)
- func CustomizeServiceAccount(sa *corev1.ServiceAccount, ba common.BaseApplication)
- func CustomizeServiceMonitor(sm *prometheusv1.ServiceMonitor, ba common.BaseApplication)
- func CustomizeServieBindingSecret(secret *corev1.Secret, auth map[string]string, ba common.BaseApplication)
- func CustomizeStatefulSet(statefulSet *appsv1.StatefulSet, ba common.BaseApplication)
- func EnsureOwnerRef(metadata metav1.Object, newOwnerRef metav1.OwnerReference) bool
- func ErrorIsNoMatchesForKind(err error, kind string, version string) bool
- func GetCondition(conditionType appsodyv1beta1.StatusConditionType, ...) *appsodyv1beta1.StatusCondition
- func GetWatchNamespaces() ([]string, error)
- func MergeMaps(maps ...map[string]string) map[string]string
- func SetCondition(condition appsodyv1beta1.StatusCondition, ...)
- func UpdateAppDefinition(labels map[string]string, annotations map[string]string, ...)
- func Validate(ba common.BaseApplication) (bool, error)
- type ReconcilerBase
- func (r *ReconcilerBase) AsOwner(rObj runtime.Object, controller bool) (metav1.OwnerReference, error)
- func (r *ReconcilerBase) CreateOrUpdate(obj metav1.Object, owner metav1.Object, reconcile func() error) error
- func (r *ReconcilerBase) DeleteResource(obj runtime.Object) error
- func (r *ReconcilerBase) DeleteResources(resources []runtime.Object) error
- func (r *ReconcilerBase) GetAppsodyOpConfigMap(name string, ns string) (*corev1.ConfigMap, error)
- func (r *ReconcilerBase) GetClient() client.Client
- func (r *ReconcilerBase) GetDiscoveryClient() (discovery.DiscoveryInterface, error)
- func (r *ReconcilerBase) GetRecorder() record.EventRecorder
- func (r *ReconcilerBase) GetServiceBindingCreds(ba common.BaseApplication) (map[string]string, error)
- func (r *ReconcilerBase) IsGroupVersionSupported(groupVersion string) (bool, error)
- func (r *ReconcilerBase) ManageError(issue error, conditionType common.StatusConditionType, ...) (reconcile.Result, error)
- func (r *ReconcilerBase) ManageSuccess(conditionType common.StatusConditionType, ba common.BaseApplication) (reconcile.Result, error)
- func (r *ReconcilerBase) ReconcileConsumes(ba common.BaseApplication) (reconcile.Result, error)
- func (r *ReconcilerBase) ReconcileProvides(ba common.BaseApplication) (_ reconcile.Result, err error)
- func (r *ReconcilerBase) SetDiscoveryClient(discovery discovery.DiscoveryInterface)
- func (r *ReconcilerBase) SyncSecretAcrossNamespace(fromSecret *corev1.Secret, namespace string) error
- func (r *ReconcilerBase) UpdateStatus(obj runtime.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfNotSubstring ¶ added in v0.3.0
AppendIfNotSubstring appends `a` to comma-separated list of strings in `s`
func BuildServiceBindingSecretName ¶ added in v0.3.0
BuildServiceBindingSecretName returns secret name of a consumable service
func ContainsString ¶ added in v0.3.0
ContainsString returns true if `s` is in the slice. Otherwise, returns false
func CustomizeAffinity ¶
func CustomizeAffinity(a *corev1.Affinity, ba common.BaseApplication)
CustomizeAffinity ...
func CustomizeConsumedServices ¶ added in v0.3.0
func CustomizeConsumedServices(podSpec *corev1.PodSpec, ba common.BaseApplication)
CustomizeConsumedServices ...
func CustomizeDeployment ¶ added in v0.2.0
func CustomizeDeployment(deploy *appsv1.Deployment, ba common.BaseApplication)
CustomizeDeployment ...
func CustomizeHPA ¶
func CustomizeHPA(hpa *autoscalingv1.HorizontalPodAutoscaler, ba common.BaseApplication)
CustomizeHPA ...
func CustomizeKnativeService ¶
func CustomizeKnativeService(ksvc *servingv1alpha1.Service, ba common.BaseApplication)
CustomizeKnativeService ...
func CustomizePersistence ¶
func CustomizePersistence(statefulSet *appsv1.StatefulSet, ba common.BaseApplication)
CustomizePersistence ...
func CustomizePodSpec ¶
func CustomizePodSpec(pts *corev1.PodTemplateSpec, ba common.BaseApplication)
CustomizePodSpec ...
func CustomizeRoute ¶
func CustomizeRoute(route *routev1.Route, ba common.BaseApplication)
CustomizeRoute ...
func CustomizeService ¶
func CustomizeService(svc *corev1.Service, ba common.BaseApplication)
CustomizeService ...
func CustomizeServiceAccount ¶
func CustomizeServiceAccount(sa *corev1.ServiceAccount, ba common.BaseApplication)
CustomizeServiceAccount ...
func CustomizeServiceMonitor ¶ added in v0.2.0
func CustomizeServiceMonitor(sm *prometheusv1.ServiceMonitor, ba common.BaseApplication)
CustomizeServiceMonitor ...
func CustomizeServieBindingSecret ¶ added in v0.3.0
func CustomizeServieBindingSecret(secret *corev1.Secret, auth map[string]string, ba common.BaseApplication)
CustomizeServieBindingSecret ...
func CustomizeStatefulSet ¶ added in v0.2.0
func CustomizeStatefulSet(statefulSet *appsv1.StatefulSet, ba common.BaseApplication)
CustomizeStatefulSet ...
func EnsureOwnerRef ¶ added in v0.3.0
func EnsureOwnerRef(metadata metav1.Object, newOwnerRef metav1.OwnerReference) bool
EnsureOwnerRef adds the ownerref if needed. Removes ownerrefs with conflicting UIDs. Returns true if the input is mutated. Copied from "https://github.com/openshift/library-go/blob/release-4.5/pkg/controller/ownerref.go"
func ErrorIsNoMatchesForKind ¶
ErrorIsNoMatchesForKind ...
func GetCondition ¶
func GetCondition(conditionType appsodyv1beta1.StatusConditionType, status *appsodyv1beta1.AppsodyApplicationStatus) *appsodyv1beta1.StatusCondition
GetCondition ...
func GetWatchNamespaces ¶ added in v0.2.0
GetWatchNamespaces returns a slice of namespaces the operator should watch based on WATCH_NAMESPSCE value WATCH_NAMESPSCE value could be empty for watching the whole cluster or a comma-separated list of namespaces
func MergeMaps ¶ added in v0.2.2
MergeMaps returns a map containing the union of al the key-value pairs from the input maps. The order of the maps passed into the func, defines the importance. e.g. if (keyA, value1) is in map1, and (keyA, value2) is in map2, mergeMaps(map1, map2) would contain (keyA, value2).
func SetCondition ¶
func SetCondition(condition appsodyv1beta1.StatusCondition, status *appsodyv1beta1.AppsodyApplicationStatus)
SetCondition ...
func UpdateAppDefinition ¶ added in v0.2.0
func UpdateAppDefinition(labels map[string]string, annotations map[string]string, ba common.BaseApplication)
UpdateAppDefinition ...
Types ¶
type ReconcilerBase ¶
type ReconcilerBase struct {
// contains filtered or unexported fields
}
ReconcilerBase base reconciler with some common behaviour
func NewReconcilerBase ¶
func NewReconcilerBase(client client.Client, scheme *runtime.Scheme, restConfig *rest.Config, recorder record.EventRecorder) ReconcilerBase
NewReconcilerBase creates a new ReconcilerBase
func (*ReconcilerBase) AsOwner ¶ added in v0.3.0
func (r *ReconcilerBase) AsOwner(rObj runtime.Object, controller bool) (metav1.OwnerReference, error)
AsOwner returns an owner reference object based on the input object. Also can set controller field on the owner ref.
func (*ReconcilerBase) CreateOrUpdate ¶
func (r *ReconcilerBase) CreateOrUpdate(obj metav1.Object, owner metav1.Object, reconcile func() error) error
CreateOrUpdate ...
func (*ReconcilerBase) DeleteResource ¶
func (r *ReconcilerBase) DeleteResource(obj runtime.Object) error
DeleteResource deletes kubernetes resource
func (*ReconcilerBase) DeleteResources ¶
func (r *ReconcilerBase) DeleteResources(resources []runtime.Object) error
DeleteResources ...
func (*ReconcilerBase) GetAppsodyOpConfigMap ¶
GetAppsodyOpConfigMap ...
func (*ReconcilerBase) GetClient ¶
func (r *ReconcilerBase) GetClient() client.Client
GetClient returns client
func (*ReconcilerBase) GetDiscoveryClient ¶
func (r *ReconcilerBase) GetDiscoveryClient() (discovery.DiscoveryInterface, error)
GetDiscoveryClient ...
func (*ReconcilerBase) GetRecorder ¶
func (r *ReconcilerBase) GetRecorder() record.EventRecorder
GetRecorder returns the underlying recorder
func (*ReconcilerBase) GetServiceBindingCreds ¶ added in v0.3.0
func (r *ReconcilerBase) GetServiceBindingCreds(ba common.BaseApplication) (map[string]string, error)
GetServiceBindingCreds returns a map containing username/password string values based on 'cr.spec.service.provides.auth'
func (*ReconcilerBase) IsGroupVersionSupported ¶
func (r *ReconcilerBase) IsGroupVersionSupported(groupVersion string) (bool, error)
IsGroupVersionSupported ...
func (*ReconcilerBase) ManageError ¶
func (r *ReconcilerBase) ManageError(issue error, conditionType common.StatusConditionType, ba common.BaseApplication) (reconcile.Result, error)
ManageError ...
func (*ReconcilerBase) ManageSuccess ¶
func (r *ReconcilerBase) ManageSuccess(conditionType common.StatusConditionType, ba common.BaseApplication) (reconcile.Result, error)
ManageSuccess ...
func (*ReconcilerBase) ReconcileConsumes ¶ added in v0.3.0
func (r *ReconcilerBase) ReconcileConsumes(ba common.BaseApplication) (reconcile.Result, error)
ReconcileConsumes ...
func (*ReconcilerBase) ReconcileProvides ¶ added in v0.3.0
func (r *ReconcilerBase) ReconcileProvides(ba common.BaseApplication) (_ reconcile.Result, err error)
ReconcileProvides ...
func (*ReconcilerBase) SetDiscoveryClient ¶
func (r *ReconcilerBase) SetDiscoveryClient(discovery discovery.DiscoveryInterface)
SetDiscoveryClient ...
func (*ReconcilerBase) SyncSecretAcrossNamespace ¶ added in v0.3.0
func (r *ReconcilerBase) SyncSecretAcrossNamespace(fromSecret *corev1.Secret, namespace string) error
SyncSecretAcrossNamespace syncs up the secret data across a namespace
func (*ReconcilerBase) UpdateStatus ¶ added in v0.3.0
func (r *ReconcilerBase) UpdateStatus(obj runtime.Object) error
UpdateStatus updates the fields corresponding to the status subresource for the object