Skip to content
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

IBM Cloud manifest profile patch for operator deployment #252

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ORG=openshift
TAG=$(shell git rev-parse --abbrev-ref HEAD)
IMAGE=$(REGISTRY)/$(ORG)/origin-cluster-node-tuning-operator:$(TAG)

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

all: build

clone-tuned:
Expand Down Expand Up @@ -122,4 +126,12 @@ local-image:
local-image-push:
$(IMAGE_PUSH_CMD) $(IMAGE_PUSH_EXTRA_OPTS) $(IMAGE)

# This will include additional actions on the update and verify targets to ensure that profile patches are applied
# to manifest files
# $0 - macro name
# $1 - target name
# $2 - profile patches directory
# $3 - manifests directory
$(call add-profile-manifests,manifests,./profile-patches,./manifests)

.PHONY: all build deepcopy crd-schema-gen test-e2e verify verify-gofmt clean local-image local-image-push
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
github.com/openshift/api v0.0.0-20210521075222-e273a339932a
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142
github.com/openshift/library-go v0.0.0-20210521084623-7392ea9b02ca
github.com/openshift/machine-config-operator v0.0.1-0.20210514234214-c415ce6aed25
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3
github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc=
github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e h1:F7rBobgSjtYL3/zsgDUjlTVx3Z06hdgpoldpDcn7jzc=
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/client-go v0.0.0-20201214125552-e615e336eb49/go.mod h1:9/jG4I6sh+5QublJpZZ4Zs/P4/QCXMsQQ/K/058bSB8=
github.com/openshift/client-go v0.0.0-20210112165513-ebc401615f47/go.mod h1:u7NRAjtYVAKokiI9LouzTv4mhds8P4S1TwdVAfbjKSk=
Expand Down
84 changes: 84 additions & 0 deletions manifests/50-operator-ibm-cloud-managed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# *** AUTOMATICALLY GENERATED FILE - DO NOT EDIT ***
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
include.release.openshift.io/ibm-cloud-managed: "true"
name: cluster-node-tuning-operator
namespace: openshift-cluster-node-tuning-operator
spec:
replicas: 1
selector:
matchLabels:
name: cluster-node-tuning-operator
template:
metadata:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
labels:
name: cluster-node-tuning-operator
spec:
containers:
- args:
- -v=0
command:
- cluster-node-tuning-operator
env:
- name: RELEASE_VERSION
value: 0.0.1-snapshot
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: RESYNC_PERIOD
value: "600"
- name: CLUSTER_NODE_TUNED_IMAGE
value: registry.ci.openshift.org/openshift/origin-v4.0:cluster-node-tuning-operator
image: registry.ci.openshift.org/openshift/origin-v4.0:cluster-node-tuning-operator
imagePullPolicy: IfNotPresent
name: cluster-node-tuning-operator
ports:
- containerPort: 60000
name: metrics
resources:
requests:
cpu: 10m
memory: 20Mi
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/secrets
name: node-tuning-operator-tls
- mountPath: /var/run/configmaps/trusted-ca/
name: trusted-ca
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 499
serviceAccountName: cluster-node-tuning-operator
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: node-tuning-operator-tls
secret:
secretName: node-tuning-operator-tls
- configMap:
items:
- key: ca-bundle.crt
path: tls-ca-bundle.pem
name: trusted-ca
optional: true
name: trusted-ca
1 change: 0 additions & 1 deletion manifests/50-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
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"
name: cluster-node-tuning-operator
Expand Down
6 changes: 6 additions & 0 deletions profile-patches/ibm-cloud-managed/50-operator.yaml-patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /metadata/annotations
value:
include.release.openshift.io/ibm-cloud-managed: "true"
- op: remove
path: /spec/template/spec/nodeSelector
1 change: 1 addition & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package tools

import (
_ "github.com/kevinburke/go-bindata/go-bindata" // To generate bindata from /assets/tuned/manifests
_ "github.com/openshift/build-machinery-go" // To create patched cluster profile manifests
_ "k8s.io/code-generator" // To generate DeepCopy fns() for API, clientsets/listers/informers
_ "sigs.k8s.io/controller-tools/cmd/controller-gen" // To generate tuned.openshift.io CRDs
)
201 changes: 201 additions & 0 deletions vendor/github.com/openshift/build-machinery-go/LICENSE

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