Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ GOLANGCI_LINT = _output/tools/golangci-lint
GOLANGCI_LINT_CACHE = $(PWD)/_output/golangci-lint-cache
GOLANGCI_LINT_VERSION = v1.24

GO_REQUIRED_MIN_VERSION = 1.14
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any special reason for not going with a newer version? I have noticed here that if it is not set we go for 1.15.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I added this here, is that verify previously failed (looks like your CI test is using an older go version):
https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_cluster-image-registry-operator/643/pull-ci-openshift-cluster-image-registry-operator-master-verify/1376950809396252672
Note that this is the minimum version. It's fine to use a newer release.


include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
targets/openshift/bindata.mk \
targets/openshift/operator/profile-manifests.mk \
)

$(call add-bindata,assets,./bindata/...,./bindata/,assets,pkg/assets/bindata.go)

$(call add-profile-manifests,manifests,./profile-patches,./manifests)

all: build build-image verify
.PHONY: all

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
github.com/imdario/mergo v0.3.8 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/openshift/api v0.0.0-20201117184740-859beeffd973
github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab
github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359
github.com/openshift/client-go v0.0.0-20200729195840-c2b1adc6bed6
github.com/openshift/installer v0.9.0-master.0.20190726121806-6e8f9c335410
github.com/openshift/library-go v0.0.0-20200731053141-ff55255233e3
Expand Down
94 changes: 2 additions & 92 deletions go.sum

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions manifests/07-operator-ibm-cloud-managed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apiVersion: apps/v1
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind giving me some explanation on how this is going to work? I mean, with this extra manifest here isn't CVO going to create two distinct deployments (07-operator.yaml and 07-operator-ibm-cloud-managed.yaml)? Is there some special handling happening @ cvo side to handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically for any given installation of openshift only one cluster profile is active. The CVO will only apply manifests that contain an annotation for the active cluster profile.
Ref: openshift/cluster-version-operator#404
Enhancement: openshift/enhancements#200

kind: Deployment
metadata:
annotations:
config.openshift.io/inject-proxy: cluster-image-registry-operator
include.release.openshift.io/ibm-cloud-managed: "true"
name: cluster-image-registry-operator
namespace: openshift-image-registry
spec:
replicas: 1
selector:
matchLabels:
name: cluster-image-registry-operator
template:
metadata:
labels:
name: cluster-image-registry-operator
spec:
containers:
- args:
- --files=/var/run/configmaps/trusted-ca/tls-ca-bundle.pem
- --files=/etc/secrets/tls.crt
- --files=/etc/secrets/tls.key
env:
- name: RELEASE_VERSION
value: 0.0.1-snapshot
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: cluster-image-registry-operator
- name: IMAGE
value: docker.io/openshift/origin-docker-registry:latest
- name: IMAGE_PRUNER
value: quay.io/openshift/origin-cli:v4.0
image: docker.io/openshift/origin-cluster-image-registry-operator:latest
imagePullPolicy: IfNotPresent
name: cluster-image-registry-operator
ports:
- containerPort: 60000
name: metrics
resources:
requests:
cpu: 10m
memory: 50Mi
volumeMounts:
- mountPath: /var/run/configmaps/trusted-ca/
name: trusted-ca
- mountPath: /etc/secrets
name: image-registry-operator-tls
- mountPath: /var/run/secrets/openshift/serviceaccount
name: bound-sa-token
readOnly: true
priorityClassName: system-cluster-critical
serviceAccountName: cluster-image-registry-operator
shareProcessNamespace: false
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 120
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 120
volumes:
- name: image-registry-operator-tls
secret:
secretName: image-registry-operator-tls
- configMap:
items:
- key: ca-bundle.crt
path: tls-ca-bundle.pem
name: trusted-ca
optional: true
name: trusted-ca
- name: bound-sa-token
projected:
sources:
- serviceAccountToken:
audience: openshift
path: token
1 change: 0 additions & 1 deletion manifests/07-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ metadata:
namespace: openshift-image-registry
annotations:
config.openshift.io/inject-proxy: cluster-image-registry-operator
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
spec:
Expand Down
7 changes: 7 additions & 0 deletions profile-patches/ibm-cloud-managed/07-operator.yaml-patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- op: replace
path: /metadata/annotations
value:
config.openshift.io/inject-proxy: cluster-image-registry-operator
include.release.openshift.io/ibm-cloud-managed: "true"
- op: remove
path: /spec/template/spec/nodeSelector
2 changes: 2 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ package tools
import (
// Makefile
"github.com/go-bindata/go-bindata/go-bindata"
"github.com/openshift/build-machinery-go/make/lib"
"github.com/openshift/build-machinery-go/make/targets/openshift"
"github.com/openshift/build-machinery-go/make/targets/openshift/operator"
)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,10 @@ github.com/openshift/api/template
github.com/openshift/api/template/v1
github.com/openshift/api/user
github.com/openshift/api/user/v1
# github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab
# github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359
github.com/openshift/build-machinery-go/make/lib
github.com/openshift/build-machinery-go/make/targets/openshift
github.com/openshift/build-machinery-go/make/targets/openshift/operator
# github.com/openshift/client-go v0.0.0-20200729195840-c2b1adc6bed6
github.com/openshift/client-go/build/clientset/versioned/scheme
github.com/openshift/client-go/build/clientset/versioned/typed/build/v1
Expand Down