-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy, kustomize: provide an OpenShift overlay
Signed-off-by: Miguel Duarte Barroso <[email protected]>
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Adds namespace to all resources. | ||
namespace: openshift-kubevirt-ipam-controller-system | ||
|
||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
app: ipam-virt-workloads | ||
|
||
resources: | ||
- ../rbac | ||
- ../manager | ||
- ../webhook | ||
|
||
patches: | ||
- path: manager_webhook_patch.yaml | ||
- path: webhookcainjection_patch.yaml | ||
- patch: |- | ||
- op: add | ||
path: /webhooks/0/objectSelector | ||
value: | ||
matchLabels: | ||
kubevirt.io: virt-launcher | ||
target: | ||
kind: MutatingWebhookConfiguration | ||
group: admissionregistration.k8s.io | ||
version: v1 | ||
name: mutating-webhook-configuration | ||
- patch: |- | ||
- op: add | ||
path: /metadata/annotations | ||
value: | ||
service.beta.openshift.io/serving-cert-secret-name: webhook-service | ||
target: | ||
kind: Service | ||
version: v1 | ||
name: webhook-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
annotations: | ||
openshift.io/required-scc: "restricted-v2" | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
args: | ||
- --leader-elect | ||
- --certificates-dir=/etc/ipam-controller/certificates | ||
ports: | ||
- containerPort: 9443 | ||
name: webhook-server | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /etc/ipam-controller/certificates | ||
name: cert | ||
readOnly: true | ||
volumes: | ||
- name: cert | ||
secret: | ||
defaultMode: 420 | ||
secretName: webhook-server-cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This patch add annotation to admission webhook config and | ||
# CERTIFICATE_NAMESPACE and CERTIFICATE_NAME will be substituted by kustomize | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: mutatingwebhookconfiguration | ||
app.kubernetes.io/instance: mutating-webhook-configuration | ||
app.kubernetes.io/component: webhook | ||
app.kubernetes.io/created-by: kubevirt-ipam-controller | ||
app.kubernetes.io/part-of: kubevirt-ipam-controller | ||
app.kubernetes.io/managed-by: kustomize | ||
name: mutating-webhook-configuration | ||
namespace: openshift-kubevirt-ipam-controller-system | ||
annotations: | ||
service.beta.openshift.io/inject-cabundle: "true" |