Skip to content

Remove any references to OCP in the helm charts and upstream manifests #2157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ export KUBEBUILDER_ASSETS
GO := GO111MODULE=on GOFLAGS="$(MOD_FLAGS)" go
GINKGO := $(GO) run github.com/onsi/ginkgo/ginkgo
BINDATA := $(GO) run github.com/go-bindata/go-bindata/v3/go-bindata

# ART builds are performed in dist-git, with content (but not commits) copied
# from the source repo. Thus at build time if your code is inspecting the local
# git repo it is getting unrelated commits and tags from the dist-git repo,
# not the source repo.
# For ART image builds, SOURCE_GIT_COMMIT, SOURCE_GIT_TAG, SOURCE_DATE_EPOCH
# variables are inserted in Dockerfile to enable recovering the original git
# metadata at build time.
GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT),$(SOURCE_GIT_COMMIT),$(shell git rev-parse HEAD))
GIT_COMMIT := $(shell git rev-parse HEAD)

.PHONY: build test run clean vendor schema-check \
vendor-update coverage coverage-html e2e \
Expand Down Expand Up @@ -223,7 +215,6 @@ release: ver=$(shell cat OLM_VERSION)
release: manifests
docker pull quay.io/operator-framework/olm:v$(ver)
$(MAKE) target=upstream ver=$(ver) quickstart=true package
$(MAKE) target=ocp ver=$(ver) package

verify-release: release diff

Expand All @@ -240,9 +231,6 @@ endif
$(YQ_INTERNAL) w -i deploy/$(target)/values.yaml package.image.ref $(olmref)
./scripts/package_release.sh $(ver) deploy/$(target)/manifests/$(ver) deploy/$(target)/values.yaml
ln -sfFn ./$(ver) deploy/$(target)/manifests/latest
ifeq ($(target), ocp)
./scripts/add_release_annotation.sh deploy/$(target)/manifests/$(ver) "$(YQ_INTERNAL)"
endif
ifeq ($(quickstart), true)
./scripts/package_quickstart.sh deploy/$(target)/manifests/$(ver) deploy/$(target)/quickstart/olm.yaml deploy/$(target)/quickstart/crds.yaml deploy/$(target)/quickstart/install.sh
endif
Expand Down
14 changes: 1 addition & 13 deletions deploy/chart/templates/0000_50_olm_00-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@ apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace }}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
annotations:
openshift.io/node-selector: ""
labels:
openshift.io/scc: "anyuid"
openshift.io/cluster-monitoring: "true"
{{ end }}

---
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.operator_namespace }}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
annotations:
openshift.io/node-selector: ""
labels:
openshift.io/scc: "anyuid"
{{ end }}
39 changes: 0 additions & 39 deletions deploy/chart/templates/0000_50_olm_02-services.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions deploy/chart/templates/0000_50_olm_07-olm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ spec:
app: olm-operator
spec:
serviceAccountName: olm-operator-serviceaccount
{{- if and .Values.installType (eq .Values.installType "ocp") }}
priorityClassName: "system-cluster-critical"
{{- end }}
containers:
- name: olm-operator
command:
Expand Down Expand Up @@ -71,10 +68,6 @@ spec:
port: {{ .Values.olm.service.internalPort }}
terminationMessagePolicy: FallbackToLogsOnError
env:
{{ if and .Values.installType (eq .Values.installType "ocp") }}
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
{{ end }}
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -85,17 +78,6 @@ spec:
resources:
{{ toYaml .Values.olm.resources | indent 12 }}
{{- end}}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
volumeMounts:
- mountPath: /var/run/secrets/serving-cert
name: serving-cert
{{ end }}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
volumes:
- name: serving-cert
secret:
secretName: olm-operator-serving-cert
{{ end }}
{{- if .Values.olm.nodeSelector }}
nodeSelector:
{{ toYaml .Values.olm.nodeSelector | indent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ spec:
app: catalog-operator
spec:
serviceAccountName: olm-operator-serviceaccount
{{- if and .Values.installType (eq .Values.installType "ocp") }}
priorityClassName: "system-cluster-critical"
{{- end }}
containers:
- name: catalog-operator
command:
Expand Down Expand Up @@ -64,26 +61,10 @@ spec:
path: /healthz
port: {{ .Values.catalog.service.internalPort }}
terminationMessagePolicy: FallbackToLogsOnError
env:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick note as I need to double-check against the current master branch, but this appeared to be problematic in the context of the upstream manifests as we'd essentially be rendering an empty env map as the only key would be that RELEASE_VERSION variable, but that conditional check would evaluate to false.

{{ if and .Values.installType (eq .Values.installType "ocp") }}
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
{{ end }}
{{- if .Values.catalog.resources }}
resources:
{{ toYaml .Values.catalog.resources | indent 12 }}
{{- end}}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
volumeMounts:
- mountPath: /var/run/secrets/serving-cert
name: serving-cert
{{ end }}
{{ if and .Values.installType (eq .Values.installType "ocp") }}
volumes:
- name: serving-cert
secret:
secretName: catalog-operator-serving-cert
{{ end }}
{{- if .Values.catalog.nodeSelector }}
nodeSelector:
{{ toYaml .Values.catalog.nodeSelector | indent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/templates/0000_90_olm_00-service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if and .Values.installType (eq .Values.installType "ocp") }}
{{ if .Values.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down Expand Up @@ -70,7 +70,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
namespace: {{ .Values.monitoring.namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
2 changes: 1 addition & 1 deletion deploy/chart/templates/0000_90_olm_01-prometheus-rule.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if and .Values.installType (eq .Values.installType "ocp") }}
{{ if .Values.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down
3 changes: 0 additions & 3 deletions deploy/chart/templates/_packageserver.deployment-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ spec:
app: packageserver
spec:
serviceAccountName: olm-operator-serviceaccount
{{- if and .Values.installType (eq .Values.installType "ocp") }}
priorityClassName: "system-cluster-critical"
{{- end }}
{{- if .Values.package.nodeSelector }}
nodeSelector:
{{- toYaml .Values.package.nodeSelector | nindent 8 }}
Expand Down
14 changes: 0 additions & 14 deletions deploy/chart/templates/image-references

This file was deleted.

4 changes: 4 additions & 0 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ package:
requests:
cpu: 10m
memory: 50Mi

monitoring:
enabled: false
namespace: monitoring
24 changes: 0 additions & 24 deletions deploy/ocp/manifests/0.10.0/0000_50_olm_00-namespace.yaml

This file was deleted.

This file was deleted.

41 changes: 0 additions & 41 deletions deploy/ocp/manifests/0.10.0/0000_50_olm_02-services.yaml

This file was deleted.

Loading