Skip to content

Commit dc6f8e4

Browse files
Merge pull request #335 from mshitrit/remove-snr-dependecy
Remove snr's dependency
2 parents 27d21c8 + fb712c5 commit dc6f8e4

File tree

7 files changed

+3
-49
lines changed

7 files changed

+3
-49
lines changed

Makefile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ bundle-base: manifests kustomize operator-sdk ## Generate bundle manifests and m
312312
cd config/manifests/base && $(KUSTOMIZE) edit set image controller=$(IMG) && $(KUSTOMIZE) edit set image kube-rbac-proxy=$(RBAC_PROXY_IMAGE)
313313
cd config/optional/console-plugin && $(KUSTOMIZE) edit set image console-plugin=${CONSOLE_PLUGIN_IMAGE}
314314
$(KUSTOMIZE) build config/manifests/base | $(OPERATOR_SDK) generate --verbose bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
315-
$(MAKE) add-metadata-dependency
316315
$(MAKE) bundle-validate
317316

318317
export CSV="./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml"
@@ -345,10 +344,6 @@ add-replaces-field: ## Add replaces field to the CSV
345344
add-community-edition-to-display-name: ## Add the "Community Edition" suffix to the display name
346345
sed -r -i "s|displayName: Node Health Check Operator|displayName: Node Health Check Operator - Community Edition|;" ${CSV}
347346

348-
.PHONY: add-metadata-dependency
349-
add-metadata-dependency: ## Add metadata/dependency.yaml to the bundle
350-
cp config/metadata/dependencies.yaml bundle/metadata/
351-
352347
.PHONY: bundle-okd
353348
bundle-okd: ocp-version-check yq bundle-base ## Generate bundle manifests and metadata for OKD, then validate generated files.
354349
$(KUSTOMIZE) build config/manifests/okd | $(OPERATOR_SDK) generate --verbose bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
@@ -368,7 +363,6 @@ bundle-ocp: yq bundle-base ## Generate bundle manifests and metadata for OCP, th
368363
# https://osbs.readthedocs.io/en/osbs_ocp3/users.html?#pinning-pullspecs-for-related-images
369364
$(YQ) -i '( .spec.install.spec.deployments[0].spec.template.spec.containers[] | select(.name == "manager") | .env) += [{"name": "RELATED_IMAGE_MUST_GATHER", "value": "${MUST_GATHER_IMAGE}"}]' ${CSV}
370365
$(MAKE) add-console-plugin-annotation
371-
$(MAKE) add-metadata-dependency
372366
# add OCP annotations
373367
$(YQ) -i '.metadata.annotations."operators.openshift.io/valid-subscription" = "[\"OpenShift Kubernetes Engine\", \"OpenShift Container Platform\", \"OpenShift Platform Plus\"]"' ${CSV}
374368
# new infrastructure annotations see https://docs.engineering.redhat.com/display/CFC/Best_Practices#Best_Practices-(New)RequiredInfrastructureAnnotations
@@ -392,14 +386,6 @@ bundle-ocp-ci: yq ## Generate OCP bundle for CI, without overriding the image pu
392386
bundle-k8s: bundle-base ## Generate bundle manifests and metadata for K8s community, then validate generated files.
393387
$(KUSTOMIZE) build config/manifests/k8s | $(OPERATOR_SDK) generate --verbose bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
394388

395-
sed -r -i "/displayName: Node Health Check Operator/ i\ " ${CSV}
396-
sed -r -i "/displayName: Node Health Check Operator/ i\ ### Notes" ${CSV}
397-
sed -r -i "/displayName: Node Health Check Operator/ i\ In case Pod Security Admission is used, please allow Pods to run" ${CSV}
398-
sed -r -i "/displayName: Node Health Check Operator/ i\ in the \"privileged\" Pod Security Standard policy." ${CSV}
399-
sed -r -i "/displayName: Node Health Check Operator/ i\ This is required by the dependent Self Node Remediation operator" ${CSV}
400-
sed -r -i "/displayName: Node Health Check Operator/ i\ for rebooting unhealthy nodes, and can be done by labeling the" ${CSV}
401-
sed -r -i "/displayName: Node Health Check Operator/ i\ the target namespace accordingly before installing NHC." ${CSV}
402-
sed -r -i "/displayName: Node Health Check Operator/ i\ For details see https://kubernetes.io/docs/concepts/security/pod-security-admission/ ." ${CSV}
403389
$(MAKE) add-community-edition-to-display-name
404390
$(MAKE) bundle-validate
405391

bundle/manifests/node-healthcheck-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ metadata:
4545
categories: OpenShift Optional
4646
containerImage: quay.io/medik8s/node-healthcheck-operator:v0.0.1
4747
createdAt: ""
48-
description: Detect failed Nodes and trigger remediation with e.g. Self Node Remediation.
48+
description: Detect failed Nodes and trigger remediation with a remediation operator.
4949
olm.skipRange: '>=0.0.1'
5050
operatorframework.io/suggested-namespace: openshift-workload-availability
5151
operatorframework.io/suggested-namespace-template: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"openshift-workload-availability","annotations":{"openshift.io/node-selector":""}}}'
@@ -232,8 +232,6 @@ spec:
232232
- Fence Agents Remediation (FAR)
233233
- Machine Deletion Remediation (MDR)
234234
235-
SNR is installed automatically when installing NHC.
236-
237235
#### Self Node Remediation (SNR)
238236
SNR uses watchdog timers and heuristics to ensure nodes enter a safe state
239237
(no longer hosting workloads) within a known and finite period of time,
@@ -249,14 +247,6 @@ spec:
249247
250248
#### Machine Deletion Remediation (MDR)
251249
MDR is limited to OpenShift, and it uses Machine API for reprovisioning unhealthy nodes by deleting their machines.
252-
253-
### Notes
254-
In case Pod Security Admission is used, please allow Pods to run
255-
in the "privileged" Pod Security Standard policy.
256-
This is required by the dependent Self Node Remediation operator
257-
for rebooting unhealthy nodes, and can be done by labeling the
258-
the target namespace accordingly before installing NHC.
259-
For details see https://kubernetes.io/docs/concepts/security/pod-security-admission/ .
260250
displayName: Node Health Check Operator - Community Edition
261251
icon:
262252
- base64data: base64EncodedIcon

bundle/metadata/dependencies.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

config/manifests/base/bases/node-healthcheck-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
categories: OpenShift Optional
88
containerImage: quay.io/medik8s/node-healthcheck-operator:v0.0.1
99
createdAt: ""
10-
description: Detect failed Nodes and trigger remediation with e.g. Self Node Remediation.
10+
description: Detect failed Nodes and trigger remediation with a remediation operator.
1111
olm.skipRange: '>=0.0.1'
1212
operatorframework.io/suggested-namespace: openshift-workload-availability
1313
operatorframework.io/suggested-namespace-template: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"openshift-workload-availability","annotations":{"openshift.io/node-selector":""}}}'
@@ -192,8 +192,6 @@ spec:
192192
- Fence Agents Remediation (FAR)
193193
- Machine Deletion Remediation (MDR)
194194
195-
SNR is installed automatically when installing NHC.
196-
197195
#### Self Node Remediation (SNR)
198196
SNR uses watchdog timers and heuristics to ensure nodes enter a safe state
199197
(no longer hosting workloads) within a known and finite period of time,

config/metadata/dependencies.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/installation.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ For configuration of NHC, please follow instructions in the [configuration guide
3535

3636
## Installing a remediator
3737

38-
Currently, NHC has the [Self Node Remediation (SNR) operator](https://www.medik8s.io/remediation/self-node-remediation/self-node-remediation/)
39-
configured as dependency. This means that SNR will be automatically installed by OLM.
40-
41-
If you want to use another remediator, you have to install it manually.
38+
You need to install a remediator manually.
4239
You can find a list of remediators known to work with NHC on the
4340
[Medik8s website](https://www.medik8s.io/remediation/remediation/#implementations)

docs/workflow.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ when debugging issues, since many steps can potentially fail. See also our
88

99
- various internal components are initialized
1010
- RBAC configuration is updated for [role aggregation with remediators](./contributing.md#rbac-and-role-aggregation)
11-
- old default configs are updated if found:
12-
- update selector to !control-plane && !master
13-
- update remediator to SelfNodeRemediation
14-
- **Note** due to the increasing number of potential configurations, the latest
15-
version of NHC is not creating a default config CR anymore
1611
- the UI plugin is configured (on OKD / OpenShift only)
1712

1813
### When a NHC CR is created / updated / deleted, or an observed node's status condition changes

0 commit comments

Comments
 (0)