Skip to content

Commit

Permalink
helm: keep namespace in manager.yaml and remove from helm overlay (#934)
Browse files Browse the repository at this point in the history
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
eguzki authored Oct 10, 2024
1 parent d17aeaa commit 2ece035
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
13 changes: 13 additions & 0 deletions charts/kuadrant-operator/templates/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
gateway.networking.k8s.io/policy: inherited
name: authpolicies.kuadrant.io
spec:
Expand Down Expand Up @@ -13206,6 +13207,7 @@ metadata:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
gateway.networking.k8s.io/policy: direct
name: dnspolicies.kuadrant.io
spec:
Expand Down Expand Up @@ -13758,6 +13760,7 @@ metadata:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrants.kuadrant.io
spec:
group: kuadrant.io
Expand Down Expand Up @@ -13899,6 +13902,7 @@ metadata:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
gateway.networking.k8s.io/policy: inherited
name: ratelimitpolicies.kuadrant.io
spec:
Expand Down Expand Up @@ -14388,6 +14392,7 @@ metadata:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
gateway.networking.k8s.io/policy: direct
name: tlspolicies.kuadrant.io
spec:
Expand Down Expand Up @@ -14751,6 +14756,7 @@ kind: ServiceAccount
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrant-operator-controller-manager
namespace: '{{ .Release.Namespace }}'
---
Expand All @@ -14759,6 +14765,7 @@ kind: Role
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrant-operator-leader-election-role
namespace: '{{ .Release.Namespace }}'
rules:
Expand Down Expand Up @@ -14799,6 +14806,7 @@ kind: ClusterRole
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrant-operator-manager-role
rules:
- apiGroups:
Expand Down Expand Up @@ -15283,6 +15291,7 @@ kind: RoleBinding
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrant-operator-leader-election-rolebinding
namespace: '{{ .Release.Namespace }}'
roleRef:
Expand All @@ -15299,6 +15308,7 @@ kind: ClusterRoleBinding
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
name: kuadrant-operator-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -15314,6 +15324,7 @@ kind: Service
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
control-plane: controller-manager
name: kuadrant-operator-metrics
namespace: '{{ .Release.Namespace }}'
Expand All @@ -15331,6 +15342,7 @@ kind: Deployment
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
control-plane: controller-manager
name: kuadrant-operator-controller-manager
namespace: '{{ .Release.Namespace }}'
Expand All @@ -15344,6 +15356,7 @@ spec:
metadata:
labels:
app: kuadrant
app.kubernetes.io/managed-by: helm
control-plane: controller-manager
spec:
containers:
Expand Down
1 change: 0 additions & 1 deletion config/deploy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace: kuadrant-system

resources:
- namespace.yaml
- ../default
- ../dependencies
6 changes: 0 additions & 6 deletions config/deploy/namespace.yaml

This file was deleted.

16 changes: 15 additions & 1 deletion config/helm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: "{{ .Release.Namespace }}"

labels:
- pairs:
app.kubernetes.io/managed-by: helm
includeTemplates: true

resources:
- ../default
- ../default

patches:
- patch: |-
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: kuadrant-system
6 changes: 6 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
---
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit 2ece035

Please sign in to comment.