Skip to content
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

feat: add option to install CRDs without the operator #989

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion charts/testkube-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

{{- if .Values.enabled }}
---
apiVersion: v1
data:
Expand All @@ -18,3 +18,4 @@ kind: ConfigMap
metadata:
name: testkube-operator-manager-config
namespace: {{ include "testkube-operator.namespace" . }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/testkube-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
apiVersion: {{ include "global.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
Expand Down Expand Up @@ -143,3 +144,4 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/testkube-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.rbac.create }}
{{ if and .Values.enabled .Values.rbac.create }}
---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
Expand Down Expand Up @@ -493,7 +493,7 @@ rules:
- watch
- deletecollection

{{- if and .Values.webhook.enabled .Values.webhook.patch.enabled }}
{{- if and .Values.enabled (and .Values.webhook.enabled .Values.webhook.patch.enabled) }}
---
apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: ClusterRole
Expand Down
4 changes: 2 additions & 2 deletions charts/testkube-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.rbac.create }}
{{ if and .Values.enabled .Values.rbac.create }}
---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
Expand Down Expand Up @@ -114,7 +114,7 @@ subjects:
name: {{ include "testkube-operator.serviceAccountName" . }}
namespace: {{ include "testkube-operator.namespace" . }}

{{- if and .Values.webhook.enabled .Values.webhook.patch.enabled }}
{{- if and .Values.enabled (and .Values.webhook.enabled .Values.webhook.patch.enabled) }}
---
apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: ClusterRoleBinding
Expand Down
2 changes: 2 additions & 0 deletions charts/testkube-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -43,3 +44,4 @@ spec:
targetPort: 9443
selector:
control-plane: controller-manager
{{- end }}
4 changes: 2 additions & 2 deletions charts/testkube-operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.serviceAccount.create -}}
{{- if and .Values.enabled .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -18,7 +18,7 @@ metadata:
{{- end }}
{{- end }}

{{- if and .Values.webhook.enabled .Values.webhook.patch.enabled }}
{{- if and .Values.enabled (and .Values.webhook.enabled .Values.webhook.patch.enabled) }}
---
apiVersion: v1
kind: ServiceAccount
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.testConnection.enabled }}
{{- if and .Values.enabled .Values.testConnection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.webhook.enabled .Values.webhook.patch.enabled }}
{{- if and .Values.enabled (and .Values.webhook.enabled .Values.webhook.patch.enabled) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.webhook.enabled .Values.webhook.patch.enabled }}
{{- if and .Values.enabled (and .Values.webhook.enabled .Values.webhook.patch.enabled) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/testkube-operator/templates/webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.webhook.enabled }}
{{- if and .Values.enabled .Values.webhook.enabled }}
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/testkube-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ global:
## Kubernetes version (using Helm capabilities if not set)
kubeVersion: ""

## Should install the Operator
enabled: true

## Should we install CRDS - when they can be installed from other Testkube instance
installCRD: true

Expand Down
Loading