diff --git a/Makefile b/Makefile index 69f0069..5beb381 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ HELM_CHARTS=$(shell ls charts) -INCUBATING_HELM_CHARTS=$(shell ls incubating/charts) +#INCUBATING_HELM_CHARTS=$(shell ls incubating/charts) lint: # for each in $(HELM_CHARTS) and $(INCUBATING_HELM_CHARTS), do helm lint $(foreach chart,$(HELM_CHARTS),helm lint charts/$(chart);) - $(foreach chart,$(INCUBATING_HELM_CHARTS),helm lint incubating/charts/$(chart);) + #$(foreach chart,$(INCUBATING_HELM_CHARTS),helm lint incubating/charts/$(chart);) sync-crds: - ./scripts/sync-crds.sh incubating/charts/risingwave-operator/templates/crds \ No newline at end of file + ./scripts/sync-crds.sh charts/risingwave-operator/crds \ No newline at end of file diff --git a/incubating/charts/risingwave-operator/.helmignore b/charts/risingwave-operator/.helmignore similarity index 100% rename from incubating/charts/risingwave-operator/.helmignore rename to charts/risingwave-operator/.helmignore diff --git a/incubating/charts/risingwave-operator/Chart.yaml b/charts/risingwave-operator/Chart.yaml similarity index 97% rename from incubating/charts/risingwave-operator/Chart.yaml rename to charts/risingwave-operator/Chart.yaml index c594c6b..53fadbf 100644 --- a/incubating/charts/risingwave-operator/Chart.yaml +++ b/charts/risingwave-operator/Chart.yaml @@ -13,7 +13,7 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.5.0" +appVersion: "v0.5.0" home: https://www.risingwave.com icon: https://avatars.githubusercontent.com/u/77175557?s=48&v=4 diff --git a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml similarity index 99% rename from incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml rename to charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml index 9758ee8..a11da8b 100644 --- a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml +++ b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavepodtemplates.yaml @@ -1,4 +1,3 @@ -{{- if .Values.installCRDs }} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -7143,4 +7142,3 @@ spec: type: object served: true storage: true -{{- end }} diff --git a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwaves.yaml b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwaves.yaml similarity index 99% rename from incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwaves.yaml rename to charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwaves.yaml index b3f1e77..1543d12 100644 --- a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwaves.yaml +++ b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwaves.yaml @@ -1,4 +1,3 @@ -{{- if .Values.installCRDs }} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -34785,4 +34784,3 @@ spec: storage: true subresources: status: {} -{{- end }} diff --git a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml similarity index 99% rename from incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml rename to charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml index c6977da..a80e1f8 100644 --- a/incubating/charts/risingwave-operator/templates/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml +++ b/charts/risingwave-operator/crds/risingwave.risingwavelabs.com_risingwavescaleviews.yaml @@ -1,4 +1,3 @@ -{{- if .Values.installCRDs }} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -140,4 +139,3 @@ spec: specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas status: {} -{{- end }} diff --git a/incubating/charts/risingwave-operator/templates/NOTES.txt b/charts/risingwave-operator/templates/NOTES.txt similarity index 100% rename from incubating/charts/risingwave-operator/templates/NOTES.txt rename to charts/risingwave-operator/templates/NOTES.txt diff --git a/incubating/charts/risingwave-operator/templates/_helpers.tpl b/charts/risingwave-operator/templates/_helpers.tpl similarity index 100% rename from incubating/charts/risingwave-operator/templates/_helpers.tpl rename to charts/risingwave-operator/templates/_helpers.tpl diff --git a/incubating/charts/risingwave-operator/templates/certs/certificate.yaml b/charts/risingwave-operator/templates/certs/certificate.yaml similarity index 100% rename from incubating/charts/risingwave-operator/templates/certs/certificate.yaml rename to charts/risingwave-operator/templates/certs/certificate.yaml diff --git a/incubating/charts/risingwave-operator/templates/certs/issuer.yaml b/charts/risingwave-operator/templates/certs/issuer.yaml similarity index 100% rename from incubating/charts/risingwave-operator/templates/certs/issuer.yaml rename to charts/risingwave-operator/templates/certs/issuer.yaml diff --git a/charts/risingwave-operator/templates/clusterrole.yaml b/charts/risingwave-operator/templates/clusterrole.yaml new file mode 100644 index 0000000..be0a22b --- /dev/null +++ b/charts/risingwave-operator/templates/clusterrole.yaml @@ -0,0 +1,175 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kruise.io + resources: + - clonesets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps.kruise.io + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - create + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - update + - watch +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - risingwave.risingwavelabs.com + resources: + - risingwaves + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - risingwave.risingwavelabs.com + resources: + - risingwaves/finalizers + verbs: + - update +- apiGroups: + - risingwave.risingwavelabs.com + resources: + - risingwaves/status + verbs: + - get + - patch + - update +- apiGroups: + - risingwave.risingwavelabs.com + resources: + - risingwavescaleviews + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - risingwave.risingwavelabs.com + resources: + - risingwavescaleviews/status + verbs: + - get + - patch + - update \ No newline at end of file diff --git a/charts/risingwave-operator/templates/clusterrolebinding.yaml b/charts/risingwave-operator/templates/clusterrolebinding.yaml new file mode 100644 index 0000000..c7362ea --- /dev/null +++ b/charts/risingwave-operator/templates/clusterrolebinding.yaml @@ -0,0 +1,27 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "risingwave-operator.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "risingwave-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/risingwave-operator/templates/deployment.yaml b/charts/risingwave-operator/templates/deployment.yaml new file mode 100644 index 0000000..0221ac5 --- /dev/null +++ b/charts/risingwave-operator/templates/deployment.yaml @@ -0,0 +1,155 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + apps.kubernetes.io/component: manager + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.manager.updateStrategy }} + strategy: + {{- toYaml .Values.manager.updateStrategy | nindent 4 }} + {{- end }} + replicas: {{ .Values.manager.replicaCount }} + minReadySeconds: {{ .Values.manager.minReadySeconds }} + selector: + matchLabels: + {{- include "risingwave-operator.selectorLabels" . | nindent 6 }} + apps.kubernetes.io/component: manager + template: + metadata: + annotations: + {{- include "risingwave-operator.annotations" . | nindent 8 }} + {{- with .Values.manager.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "risingwave-operator.labels" . | nindent 8 }} + apps.kubernetes.io/component: manager + {{- with .Values.manager.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "risingwave-operator.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} + shareProcessNamespace: {{ .Values.manager.shareProcessNamespace }} + {{- if .Values.manager.runtimeClassName }} + runtimeClassName: {{ .Values.manager.runtimeClassName }} + {{- end }} + {{- if .Values.manager.priorityClassName }} + priorityClassName: {{ .Values.manager.priorityClassName }} + {{- end }} + {{- if .Values.manager.schedulerName }} + schedulerName: {{ .Values.manager.schedulerName }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.manager.terminationGracePeriodSeconds }} + {{- if .Values.manager.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.manager.topologySpreadConstraints | nindent 8 }} + {{- end }} + {{- if .Values.manager.nodeSelector }} + nodeSelector: + {{- toYaml .Values.manager.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.manager.affinity }} + affinity: + {{- toYaml .Values.manager.affinity | nindent 8 }} + {{- end }} + {{- if .Values.manager.tolerations }} + tolerations: + {{- toYaml .Values.manager.tolerations | nindent 8 }} + {{- end }} + {{- if .Values.manager.podSecurityContext }} + securityContext: + {{- toYaml .Values.manager.podSecurityContext | nindent 8 }} + {{- end }} + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: {{ include "risingwave-operator.fullname" . }} + containers: + - name: manager + image: {{ include "risingwave-operator.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.manager.securityContext }} + securityContext: + {{- toYaml .Values.manager.securityContext | nindent 10 }} + {{- end }} + env: + {{- if .Values.manager.extraEnvVars }} + {{- range .Values.manager.extraEnvVars }} + - {{ . }} + {{- end }} + {{- end }} + envFrom: + {{- if .Values.manager.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.manager.extraEnvVarsSecret }} + {{- end }} + {{- if .Values.manager.extraEnvVarsConfigMap }} + - configMapRef: + name: {{ .Values.manager.extraEnvVarsConfigMap }} + {{- end }} + command: + - /manager + args: + - --leader-elect + - --zap-devel=true + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + {{- if .Values.manager.extraArgs }} + {{- range .Values.manager.extraArgs }} + - {{ . }} + {{- end }} + {{- end }} + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + ports: + - containerPort: 9443 + name: webhook + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {{- toYaml .Values.manager.resources | nindent 10 }} + - name: proxy + image: {{ .Values.proxy.image }} + imagePullPolicy: {{ .Values.proxy.imagePullPolicy }} + args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + ports: + - containerPort: 8443 + name: metrics + protocol: TCP + {{- if .Values.manager.additionalContainers }} + {{- toYaml .Values.manager.additionalContainers | nindent 6 }} + {{- end }} \ No newline at end of file diff --git a/charts/risingwave-operator/templates/proxy/clusterrole.yaml b/charts/risingwave-operator/templates/proxy/clusterrole.yaml new file mode 100644 index 0000000..41dd150 --- /dev/null +++ b/charts/risingwave-operator/templates/proxy/clusterrole.yaml @@ -0,0 +1,32 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ printf "%s-proxy" (include "risingwave-operator.fullname" .) | trunc 63 | trimSuffix "-" }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create \ No newline at end of file diff --git a/charts/risingwave-operator/templates/proxy/clusterrolebinding.yaml b/charts/risingwave-operator/templates/proxy/clusterrolebinding.yaml new file mode 100644 index 0000000..e28c776 --- /dev/null +++ b/charts/risingwave-operator/templates/proxy/clusterrolebinding.yaml @@ -0,0 +1,27 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ printf "%s-proxy" (include "risingwave-operator.fullname" .) | trunc 63 | trimSuffix "-" }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ printf "%s-proxy" (include "risingwave-operator.fullname" .) | trunc 63 | trimSuffix "-" }} +subjects: +- kind: ServiceAccount + name: {{ include "risingwave-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/risingwave-operator/templates/role.yaml b/charts/risingwave-operator/templates/role.yaml new file mode 100644 index 0000000..3280b8b --- /dev/null +++ b/charts/risingwave-operator/templates/role.yaml @@ -0,0 +1,51 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch \ No newline at end of file diff --git a/charts/risingwave-operator/templates/rolebinding.yaml b/charts/risingwave-operator/templates/rolebinding.yaml new file mode 100644 index 0000000..4079faa --- /dev/null +++ b/charts/risingwave-operator/templates/rolebinding.yaml @@ -0,0 +1,27 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "risingwave-operator.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "risingwave-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/risingwave-operator/templates/service.yaml b/charts/risingwave-operator/templates/service.yaml new file mode 100644 index 0000000..af419d1 --- /dev/null +++ b/charts/risingwave-operator/templates/service.yaml @@ -0,0 +1,31 @@ +{{/* +Copyright RisingWave Labs. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "risingwave-operator.fullname" . }} + labels: + {{- include "risingwave-operator.labels" . | nindent 4 }} + {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} + {{- if $annotations }} + annotations: + {{ nindent 4 $annotations }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ports: + - port: 443 + protocol: TCP + targetPort: webhook + name: webhook + - port: 8443 + protocol: TCP + targetPort: metrics + name: metrics + selector: + {{- include "risingwave-operator.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/incubating/charts/risingwave-operator/templates/serviceaccount.yaml b/charts/risingwave-operator/templates/serviceaccount.yaml similarity index 100% rename from incubating/charts/risingwave-operator/templates/serviceaccount.yaml rename to charts/risingwave-operator/templates/serviceaccount.yaml diff --git a/incubating/charts/risingwave-operator/templates/webhook/mutating.yaml b/charts/risingwave-operator/templates/webhook/mutating.yaml similarity index 93% rename from incubating/charts/risingwave-operator/templates/webhook/mutating.yaml rename to charts/risingwave-operator/templates/webhook/mutating.yaml index 6745b5a..3e33193 100644 --- a/incubating/charts/risingwave-operator/templates/webhook/mutating.yaml +++ b/charts/risingwave-operator/templates/webhook/mutating.yaml @@ -9,9 +9,10 @@ metadata: name: {{ include "risingwave-operator.fullname" . }} labels: {{- include "risingwave-operator.labels" . | nindent 4 }} + annotations: + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "risingwave-operator.fullname" . }} {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} {{- if $annotations }} - annotations: {{ nindent 4 $annotations }} {{- end }} {{- with .Values.serviceAccount.annotations }} diff --git a/incubating/charts/risingwave-operator/templates/webhook/validating.yaml b/charts/risingwave-operator/templates/webhook/validating.yaml similarity index 93% rename from incubating/charts/risingwave-operator/templates/webhook/validating.yaml rename to charts/risingwave-operator/templates/webhook/validating.yaml index 9380398..335e33b 100644 --- a/incubating/charts/risingwave-operator/templates/webhook/validating.yaml +++ b/charts/risingwave-operator/templates/webhook/validating.yaml @@ -9,9 +9,10 @@ metadata: name: {{ include "risingwave-operator.fullname" . }} labels: {{- include "risingwave-operator.labels" . | nindent 4 }} + annotations: + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "risingwave-operator.fullname" . }} {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} {{- if $annotations }} - annotations: {{ nindent 4 $annotations }} {{- end }} {{- with .Values.serviceAccount.annotations }} diff --git a/incubating/charts/risingwave-operator/values.yaml b/charts/risingwave-operator/values.yaml similarity index 93% rename from incubating/charts/risingwave-operator/values.yaml rename to charts/risingwave-operator/values.yaml index 6202642..dd1dda3 100644 --- a/incubating/charts/risingwave-operator/values.yaml +++ b/charts/risingwave-operator/values.yaml @@ -86,10 +86,6 @@ image: ## pullSecrets: [ ] -## @param installCRDs Install CRDs -## -installCRDs: true - manager: ## @param manager.replicaCount Number of replicas ## @@ -101,7 +97,13 @@ manager: # type: RollingUpdate # rollingUpdate: # maxSurge: 0 - # maxUnavailable: 1 + # maxUnavailable: 1 + + ## @param manager.minReadySeconds Minimum number of seconds for which a newly created pod should be ready + ## without any of its container crashing. + ## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + ## + minReadySeconds: 0 ## @param manager.podLabels Labels to add to the operator pod. ## @@ -129,15 +131,20 @@ manager: ## @param manager.resources Resource requests and limits. ## Ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: - limits: { } - requests: { } + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi ## @param manager.podSecurityContext Pod security context. ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ## podSecurityContext: runAsNonRoot: true - type: RuntimeDefault + seccompProfile: + type: RuntimeDefault ## @param manager.securityContext Container security context. ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ @@ -199,7 +206,7 @@ manager: ## shareProcessNamespace: false -kube-rbac-proxy: +proxy: ## @param kube-rbac-proxy.image Image of the kube-rbac-proxy container ## image: quay.io/brancz/kube-rbac-proxy:v0.14.2 diff --git a/incubating/charts/risingwave-operator/templates/clusterrole.yaml b/incubating/charts/risingwave-operator/templates/clusterrole.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/incubating/charts/risingwave-operator/templates/clusterrolebinding.yaml b/incubating/charts/risingwave-operator/templates/clusterrolebinding.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/incubating/charts/risingwave-operator/templates/deployment.yaml b/incubating/charts/risingwave-operator/templates/deployment.yaml deleted file mode 100644 index 1c89304..0000000 --- a/incubating/charts/risingwave-operator/templates/deployment.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{/* -Copyright RisingWave Labs. -SPDX-License-Identifier: APACHE-2.0 -*/}} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "risingwave-operator.fullname" . }} - labels: - apps.kubernetes.io/component: manager - {{- include "risingwave-operator.labels" . | nindent 4 }} - {{- $annotations := (include "risingwave-operator.annotations" . ) | trim }} - {{- if $annotations }} - annotations: - {{ nindent 4 $annotations }} - {{- end }} - {{- with .Values.serviceAccount.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.manager.replicaCount }} - selector: - matchLabels: - {{- include "risingwave-operator.selectorLabels" . | nindent 6 }} - apps.kubernetes.io/component: manager - template: - metadata: - annotations: - {{- include "risingwave-operator.annotations" . | nindent 8 }} - {{- with .Values.manager.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "risingwave-operator.labels" . | nindent 8 }} - apps.kubernetes.io/component: manager - {{- with .Values.manager.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - containers: - - name: manager - image: {{ include "risingwave-operator.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - /manager - - --enable-leader-election - - --metrics-addr= \ No newline at end of file diff --git a/incubating/charts/risingwave-operator/templates/proxy/clusterrole.yaml b/incubating/charts/risingwave-operator/templates/proxy/clusterrole.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/incubating/charts/risingwave-operator/templates/proxy/clusterrolebinding.yaml b/incubating/charts/risingwave-operator/templates/proxy/clusterrolebinding.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/incubating/charts/risingwave-operator/templates/role.yaml b/incubating/charts/risingwave-operator/templates/role.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/incubating/charts/risingwave-operator/templates/service.yaml b/incubating/charts/risingwave-operator/templates/service.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/sync-crds.sh b/scripts/sync-crds.sh index 5d6aea1..0b57694 100755 --- a/scripts/sync-crds.sh +++ b/scripts/sync-crds.sh @@ -42,7 +42,5 @@ cd risingwave-operator || exit 1 # shellcheck disable=SC2045 for crd_file in config/crd/bases/*.yaml; do target_file=$target_dir/$(basename "$crd_file") - echo "{{- if .Values.installCRDs }}" > "$target_file" - cat "$crd_file" >> "$target_file" - echo "{{- end }}" >> "$target_file" + cp "$crd_file" "$target_file" done