From bb8a3ab56b0e324a9950e8e90bbad133fbf6930a Mon Sep 17 00:00:00 2001 From: Trevor Nierman Date: Tue, 12 Mar 2024 14:08:50 -0500 Subject: [PATCH] Separate out management cluster RMO objects from standard cluster objects. Remove console routemonitor from hypershift MCs until stable --- ...onitor-operator.api.ClusterUrlMonitor.yaml | 11 +++++ .../hypershift-route-monitor-operator/OWNERS | 1 + .../README.md | 22 ++++++++++ .../config.yaml | 12 ++++++ deploy/osd-route-monitor-operator/config.yaml | 4 ++ ...naged-cluster-config-integration.yaml.tmpl | 42 +++++++++++++++++++ ...anaged-cluster-config-production.yaml.tmpl | 42 +++++++++++++++++++ ...osd-managed-cluster-config-stage.yaml.tmpl | 42 +++++++++++++++++++ 8 files changed, 176 insertions(+) create mode 100644 deploy/hypershift-route-monitor-operator/100-openshift-route-monitor-operator.api.ClusterUrlMonitor.yaml create mode 100644 deploy/hypershift-route-monitor-operator/OWNERS create mode 100644 deploy/hypershift-route-monitor-operator/README.md create mode 100644 deploy/hypershift-route-monitor-operator/config.yaml diff --git a/deploy/hypershift-route-monitor-operator/100-openshift-route-monitor-operator.api.ClusterUrlMonitor.yaml b/deploy/hypershift-route-monitor-operator/100-openshift-route-monitor-operator.api.ClusterUrlMonitor.yaml new file mode 100644 index 0000000000..1b381ea6a4 --- /dev/null +++ b/deploy/hypershift-route-monitor-operator/100-openshift-route-monitor-operator.api.ClusterUrlMonitor.yaml @@ -0,0 +1,11 @@ +apiVersion: monitoring.openshift.io/v1alpha1 +kind: ClusterUrlMonitor +metadata: + name: api + namespace: openshift-route-monitor-operator +spec: + prefix: https://api. + port: "6443" + suffix: /livez + slo: + targetAvailabilityPercent: "99.0" diff --git a/deploy/hypershift-route-monitor-operator/OWNERS b/deploy/hypershift-route-monitor-operator/OWNERS new file mode 100644 index 0000000000..9448799207 --- /dev/null +++ b/deploy/hypershift-route-monitor-operator/OWNERS @@ -0,0 +1 @@ +reviewers: diff --git a/deploy/hypershift-route-monitor-operator/README.md b/deploy/hypershift-route-monitor-operator/README.md new file mode 100644 index 0000000000..fae6436fd6 --- /dev/null +++ b/deploy/hypershift-route-monitor-operator/README.md @@ -0,0 +1,22 @@ +# File Convention + +the convention is: +``` +${NUMBER}-${NS}.${NAME}.${TYPE}.yaml +``` + +## Number +a way to order the resources (if need be), +should be a 3 digit number just in case. + +## Ns +the namespace the resource is created in + +## Name +the name of the resource + +## Type +the type of the resource + +# Caveat +the alert name will be comprised from the RouteMonitor/ClusterUrlMonitor name, so be careful when renaming || Adding diff --git a/deploy/hypershift-route-monitor-operator/config.yaml b/deploy/hypershift-route-monitor-operator/config.yaml new file mode 100644 index 0000000000..9db3da54fc --- /dev/null +++ b/deploy/hypershift-route-monitor-operator/config.yaml @@ -0,0 +1,12 @@ +deploymentMode: SelectorSyncSet +selectorSyncSet: + matchExpressions: + - key: ext-hypershift.openshift.io/cluster-type + operator: In + values: ["management-cluster"] + - key: api.openshift.com/fedramp + operator: NotIn + values: ["true"] + - key: ext-hypershift.openshift.io/cluster-sector + operator: NotIn + values: ["ibm-infra"] diff --git a/deploy/osd-route-monitor-operator/config.yaml b/deploy/osd-route-monitor-operator/config.yaml index 5593f39dac..9791fea19d 100644 --- a/deploy/osd-route-monitor-operator/config.yaml +++ b/deploy/osd-route-monitor-operator/config.yaml @@ -5,3 +5,7 @@ selectorSyncSet: operator: NotIn values: - "true" + - key: ext-hypershift.openshift.io/cluster-type + operator: NotIn + values: + - "management-cluster" diff --git a/hack/00-osd-managed-cluster-config-integration.yaml.tmpl b/hack/00-osd-managed-cluster-config-integration.yaml.tmpl index 5efe80f5a1..ee45e4a6ce 100644 --- a/hack/00-osd-managed-cluster-config-integration.yaml.tmpl +++ b/hack/00-osd-managed-cluster-config-integration.yaml.tmpl @@ -21868,6 +21868,44 @@ objects: namespace: openshift-observability-operator patch: '{"spec":{"tolerations":[{"effect":"NoSchedule","key":"obo","value":"true"}]}}' patchType: merge +- apiVersion: hive.openshift.io/v1 + kind: SelectorSyncSet + metadata: + labels: + managed.openshift.io/gitHash: ${IMAGE_TAG} + managed.openshift.io/gitRepoName: ${REPO_NAME} + managed.openshift.io/osd: 'true' + name: hypershift-route-monitor-operator + spec: + clusterDeploymentSelector: + matchLabels: + api.openshift.com/managed: 'true' + matchExpressions: + - key: ext-hypershift.openshift.io/cluster-type + operator: In + values: + - management-cluster + - key: api.openshift.com/fedramp + operator: NotIn + values: + - 'true' + - key: ext-hypershift.openshift.io/cluster-sector + operator: NotIn + values: + - ibm-infra + resourceApplyMode: Sync + resources: + - apiVersion: monitoring.openshift.io/v1alpha1 + kind: ClusterUrlMonitor + metadata: + name: api + namespace: openshift-route-monitor-operator + spec: + prefix: https://api. + port: '6443' + suffix: /livez + slo: + targetAvailabilityPercent: '99.0' - apiVersion: hive.openshift.io/v1 kind: SelectorSyncSet metadata: @@ -30741,6 +30779,10 @@ objects: operator: NotIn values: - 'true' + - key: ext-hypershift.openshift.io/cluster-type + operator: NotIn + values: + - management-cluster resourceApplyMode: Sync resources: - apiVersion: monitoring.openshift.io/v1alpha1 diff --git a/hack/00-osd-managed-cluster-config-production.yaml.tmpl b/hack/00-osd-managed-cluster-config-production.yaml.tmpl index 5efe80f5a1..ee45e4a6ce 100644 --- a/hack/00-osd-managed-cluster-config-production.yaml.tmpl +++ b/hack/00-osd-managed-cluster-config-production.yaml.tmpl @@ -21868,6 +21868,44 @@ objects: namespace: openshift-observability-operator patch: '{"spec":{"tolerations":[{"effect":"NoSchedule","key":"obo","value":"true"}]}}' patchType: merge +- apiVersion: hive.openshift.io/v1 + kind: SelectorSyncSet + metadata: + labels: + managed.openshift.io/gitHash: ${IMAGE_TAG} + managed.openshift.io/gitRepoName: ${REPO_NAME} + managed.openshift.io/osd: 'true' + name: hypershift-route-monitor-operator + spec: + clusterDeploymentSelector: + matchLabels: + api.openshift.com/managed: 'true' + matchExpressions: + - key: ext-hypershift.openshift.io/cluster-type + operator: In + values: + - management-cluster + - key: api.openshift.com/fedramp + operator: NotIn + values: + - 'true' + - key: ext-hypershift.openshift.io/cluster-sector + operator: NotIn + values: + - ibm-infra + resourceApplyMode: Sync + resources: + - apiVersion: monitoring.openshift.io/v1alpha1 + kind: ClusterUrlMonitor + metadata: + name: api + namespace: openshift-route-monitor-operator + spec: + prefix: https://api. + port: '6443' + suffix: /livez + slo: + targetAvailabilityPercent: '99.0' - apiVersion: hive.openshift.io/v1 kind: SelectorSyncSet metadata: @@ -30741,6 +30779,10 @@ objects: operator: NotIn values: - 'true' + - key: ext-hypershift.openshift.io/cluster-type + operator: NotIn + values: + - management-cluster resourceApplyMode: Sync resources: - apiVersion: monitoring.openshift.io/v1alpha1 diff --git a/hack/00-osd-managed-cluster-config-stage.yaml.tmpl b/hack/00-osd-managed-cluster-config-stage.yaml.tmpl index 5efe80f5a1..ee45e4a6ce 100644 --- a/hack/00-osd-managed-cluster-config-stage.yaml.tmpl +++ b/hack/00-osd-managed-cluster-config-stage.yaml.tmpl @@ -21868,6 +21868,44 @@ objects: namespace: openshift-observability-operator patch: '{"spec":{"tolerations":[{"effect":"NoSchedule","key":"obo","value":"true"}]}}' patchType: merge +- apiVersion: hive.openshift.io/v1 + kind: SelectorSyncSet + metadata: + labels: + managed.openshift.io/gitHash: ${IMAGE_TAG} + managed.openshift.io/gitRepoName: ${REPO_NAME} + managed.openshift.io/osd: 'true' + name: hypershift-route-monitor-operator + spec: + clusterDeploymentSelector: + matchLabels: + api.openshift.com/managed: 'true' + matchExpressions: + - key: ext-hypershift.openshift.io/cluster-type + operator: In + values: + - management-cluster + - key: api.openshift.com/fedramp + operator: NotIn + values: + - 'true' + - key: ext-hypershift.openshift.io/cluster-sector + operator: NotIn + values: + - ibm-infra + resourceApplyMode: Sync + resources: + - apiVersion: monitoring.openshift.io/v1alpha1 + kind: ClusterUrlMonitor + metadata: + name: api + namespace: openshift-route-monitor-operator + spec: + prefix: https://api. + port: '6443' + suffix: /livez + slo: + targetAvailabilityPercent: '99.0' - apiVersion: hive.openshift.io/v1 kind: SelectorSyncSet metadata: @@ -30741,6 +30779,10 @@ objects: operator: NotIn values: - 'true' + - key: ext-hypershift.openshift.io/cluster-type + operator: NotIn + values: + - management-cluster resourceApplyMode: Sync resources: - apiVersion: monitoring.openshift.io/v1alpha1