Skip to content

Commit

Permalink
Merge pull request openshift#1193 from sjenning/add-olm-hcco-require-…
Browse files Browse the repository at this point in the history
…apis

add required-api to availablity prober for OLM and HCCO
  • Loading branch information
openshift-merge-robot authored Mar 23, 2022
2 parents 0a1aeb5 + 72cbf3d commit 6edb0bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/common"
"github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/kas"
Expand Down Expand Up @@ -173,7 +174,14 @@ func ReconcileDeployment(deployment *appsv1.Deployment, image, hcpName, openShif
},
}
config.ApplyTo(deployment)
util.AvailabilityProber(kas.InClusterKASReadyURL(deployment.Namespace, apiInternalPort), availabilityProberImage, &deployment.Spec.Template.Spec)
util.AvailabilityProber(kas.InClusterKASReadyURL(deployment.Namespace, apiInternalPort), availabilityProberImage, &deployment.Spec.Template.Spec, func(o *util.AvailabilityProberOpts) {
o.KubeconfigVolumeName = "kubeconfig"
o.RequiredAPIs = []schema.GroupVersionKind{
{Group: "imageregistry.operator.openshift.io", Version: "v1", Kind: "Config"},
{Group: "config.openshift.io", Version: "v1", Kind: "ClusterOperator"},
{Group: "config.openshift.io", Version: "v1", Kind: "ClusterVersion"},
}
})
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ func ReconcileOLMOperatorDeployment(deployment *appsv1.Deployment, ownerRef conf
o.KubeconfigVolumeName = "kubeconfig"
o.RequiredAPIs = []schema.GroupVersionKind{
{Group: "operators.coreos.com", Version: "v1alpha1", Kind: "CatalogSource"},
{Group: "operators.coreos.com", Version: "v1alpha1", Kind: "Subscription"},
{Group: "operators.coreos.com", Version: "v2", Kind: "OperatorCondition"},
{Group: "operators.coreos.com", Version: "v1", Kind: "OperatorGroup"},
{Group: "operators.coreos.com", Version: "v1", Kind: "OLMConfig"},
}
})
return nil
Expand Down

0 comments on commit 6edb0bb

Please sign in to comment.