-
Notifications
You must be signed in to change notification settings - Fork 6
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
deploy, kustomize: provide an OpenShift overlay #21
Closed
+85
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,43 @@ | ||
# Adds namespace to all resources. | ||
namespace: openshift-kubevirt-ipam-controller-system | ||
|
||
# Value of this field is prepended to the | ||
# names of all resources, e.g. a deployment named | ||
# "wordpress" becomes "alices-wordpress". | ||
# Note that it should also match with the prefix (text before '-') of the namespace | ||
# field above. | ||
namePrefix: kubevirt-ipam-controller- | ||
|
||
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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to figure out the name of the service here ... the prefix above (line 9) is not playing along here.
maybe consider removing the prefix ?...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ye no need the prefix imo
fwiw note please that CNAO will know to do it all itself based only on dist/install.yaml
so this PR is needed only if you want to be able to deploy the repo standalone on OCP
i would even suggest the minimalist manifest kustomize if so for this
even seds or easiest possible
no need naming / namespace changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks. I had forgotten about that.
Well, it still makes sense, but, the priority surely drops quite a lot.
It would still be useful to test drive the feature early on OpenShift though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing manually only the required bit, the secret need to be "kubevirt-ipam-claims-webhook-service"
maybe you can set it as such for both U/S and D/S
without prefixing stuff (or at least not the secret) and it will work ?
(adapting to kubevirt-ipam-controller-webhook-service once time comes)