Skip to content

Commit

Permalink
helm manifests template based (#904)
Browse files Browse the repository at this point in the history
* helm manifests template based

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

* remove cached deps

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

* remove charts/kuadrant-operator/Chart.lock

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

---------

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
eguzki authored Oct 3, 2024
1 parent 270408f commit 8265e10
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 23 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,18 @@ jobs:
- name: Verify generate command
run: |
make verify-go-mod
verify-helm-charts:
name: Verify helm charts
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22.x
uses: actions/setup-go@v4
with:
go-version: 1.22.x
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Run make verify-helm-charts
run: |
make verify-helm-charts
70 changes: 55 additions & 15 deletions charts/kuadrant-operator/templates/manifests.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
app: kuadrant
control-plane: controller-manager
name: kuadrant-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -15616,15 +15608,15 @@ metadata:
labels:
app: kuadrant
name: kuadrant-operator-controller-manager
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app: kuadrant
name: kuadrant-operator-leader-election-role
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -15791,6 +15783,42 @@ rules:
- patch
- update
- watch
- apiGroups:
- gateway.envoyproxy.io
resources:
- envoyextensionpolicies
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- gateway.envoyproxy.io
resources:
- envoypatchpolicies
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- gateway.envoyproxy.io
resources:
- securitypolicies
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down Expand Up @@ -15842,6 +15870,18 @@ rules:
- get
- patch
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- referencegrants
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- install.istio.io
resources:
Expand Down Expand Up @@ -16088,15 +16128,15 @@ metadata:
labels:
app: kuadrant
name: kuadrant-operator-leader-election-rolebinding
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kuadrant-operator-leader-election-role
subjects:
- kind: ServiceAccount
name: kuadrant-operator-controller-manager
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -16111,7 +16151,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: kuadrant-operator-controller-manager
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
---
apiVersion: v1
kind: Service
Expand All @@ -16120,7 +16160,7 @@ metadata:
app: kuadrant
control-plane: controller-manager
name: kuadrant-operator-metrics
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
spec:
ports:
- name: metrics
Expand All @@ -16137,7 +16177,7 @@ metadata:
app: kuadrant
control-plane: controller-manager
name: kuadrant-operator-controller-manager
namespace: kuadrant-system
namespace: '{{ .Release.Namespace }}'
spec:
replicas: 1
selector:
Expand Down
1 change: 1 addition & 0 deletions config/deploy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace: kuadrant-system

resources:
- namespace.yaml
- ../default
- ../dependencies
6 changes: 6 additions & 0 deletions config/deploy/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
6 changes: 4 additions & 2 deletions config/helm/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace: kuadrant-system

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: "{{ .Release.Namespace }}"
resources:
- ../default
6 changes: 0 additions & 6 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
---
apiVersion: apps/v1
kind: Deployment
Expand Down
5 changes: 5 additions & 0 deletions make/verify.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ verify-generate: generate ## Verify generate update.
verify-go-mod: ## Verify go.mod matches source code
go mod tidy
git diff --exit-code ./go.mod

.PHONY: verify-helm-charts
verify-helm-charts: helm-build ## Verify helm charts update.
git diff --exit-code ./charts
[ -z "$$(git ls-files --other --exclude-standard --directory --no-empty-directory ./charts)" ]

0 comments on commit 8265e10

Please sign in to comment.