Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ido Heyvi <[email protected]>
  • Loading branch information
heyvister1 committed Oct 15, 2024
1 parent 4ab7a6f commit 663ad6b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bindata/manifests/operator-webhook/002-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kind: ClusterRole
metadata:
name: operator-webhook
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
rules:
- apiGroups:
- ""
Expand All @@ -35,7 +35,7 @@ kind: ClusterRoleBinding
metadata:
name: operator-webhook-role-binding
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
4 changes: 2 additions & 2 deletions bindata/manifests/operator-webhook/003-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
cert-manager.io/inject-ca-from: {{.Namespace}}/{{.OperatorWebhookSecretName}}
{{- end }}
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
webhooks:
- name: operator-webhook.sriovnetwork.openshift.io
sideEffects: None
Expand Down Expand Up @@ -46,7 +46,7 @@ metadata:
cert-manager.io/inject-ca-from: {{.Namespace}}/{{.OperatorWebhookSecretName}}
{{- end }}
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
webhooks:
- name: operator-webhook.sriovnetwork.openshift.io
sideEffects: None
Expand Down
4 changes: 2 additions & 2 deletions bindata/manifests/webhook/002-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kind: ClusterRole
metadata:
name: network-resources-injector
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
rules:
- apiGroups:
- k8s.cni.cncf.io
Expand All @@ -34,7 +34,7 @@ kind: ClusterRoleBinding
metadata:
name: network-resources-injector-role-binding
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
2 changes: 1 addition & 1 deletion bindata/manifests/webhook/003-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
cert-manager.io/inject-ca-from: {{.Namespace}}/{{.InjectorWebhookSecretName}}
{{- end }}
labels:
created-by: {{ include "sriov-network-operator.fullname" . }}
created-by: {{ .OperatorGeneratedResourcesLabelSelector | default "sriov-network-operator" }}
webhooks:
- name: network-resources-injector-config.k8s.io
sideEffects: None
Expand Down
1 change: 1 addition & 0 deletions controllers/sriovoperatorconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ func (r *SriovOperatorConfigReconciler) syncWebhookObjs(ctx context.Context, dc
data.Data["OperatorWebhookCA"] = os.Getenv("ADMISSION_CONTROLLERS_CERTIFICATES_OPERATOR_CA_CRT")
data.Data["InjectorWebhookSecretName"] = os.Getenv("ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_SECRET_NAME")
data.Data["InjectorWebhookCA"] = os.Getenv("ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_CA_CRT")
data.Data["OperatorGeneratedResourcesLabelSelector"] = os.Getenv("OPERATOR_GENERATED_RESOURCES_LABEL_SELECTOR")

data.Data["ExternalControlPlane"] = false
if r.PlatformHelper.IsOpenshiftCluster() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{ if .Values.operator.admissionControllers.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -22,5 +21,4 @@ spec:
- {{ .Release.Namespace }}
- --label-selector
- "created-by={{ include "sriov-network-operator.fullname" . }}"
restartPolicy: Never
{{ end }}
restartPolicy: Never

0 comments on commit 663ad6b

Please sign in to comment.