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

fix: optimize helm script #3972

Merged
merged 1 commit into from
Aug 19, 2024
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
8 changes: 7 additions & 1 deletion helm/streampark/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ spec:
name: {{ .Values.spec.name }}
path: {{ .Values.ingress.path }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tls.tlsSecretName }}
{{- end }}
{{- end }}
33 changes: 31 additions & 2 deletions helm/streampark/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ rules:
{{/*
Namespaced scoped RBAC.
*/}}
{{- if .Values.watchNamespaces }}
{{- range .Values.watchNamespaces }}
{{- if .Values.rbac.watchNamespaces }}
{{- range .Values.rbac.watchNamespaces }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand All @@ -71,6 +71,22 @@ subjects:
name: {{ include "streampark.serviceAccountName" $ }}
namespace: {{ $.Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: streampark-flink-role-binding-default
namespace: {{ . }}
labels:
{{- include "streampark.labels" $ | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: edit
subjects:
- kind: ServiceAccount
name: default
namespace: {{ . }}
---
{{- end }}
{{ else }}
{{/*
Expand Down Expand Up @@ -101,5 +117,18 @@ subjects:
- kind: ServiceAccount
name: {{ include "streampark.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: streampark-flink-role-binding-default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: edit
subjects:
- kind: ServiceAccount
name: default
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
7 changes: 6 additions & 1 deletion helm/streampark/templates/streampark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ spec:
{{- toYaml .Values.spec.container.env | nindent 12 }}
securityContext:
privileged: false
command: ["bash","-c","bash ./bin/streampark.sh start_docker"]
wolfboys marked this conversation as resolved.
Show resolved Hide resolved
{{- if .Values.spec.livenessProbe.enabled }}
livenessProbe:
httpGet:
Expand Down Expand Up @@ -94,6 +93,9 @@ spec:
volumeMounts:
- name: streampark-default-config-volume
mountPath: /streampark/conf
{{- if .Values.spec.volumeMounts }}
{{ toYaml .Values.spec.volumeMounts | trim | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.spec.resources | nindent 12 }}
volumes:
Expand All @@ -105,3 +107,6 @@ spec:
path: config.yaml
- key: logback-spring.xml
path: logback-spring.xml
{{- if .Values.spec.volumes }}
{{ toYaml .Values.spec.volumes | trim | nindent 8 }}
{{- end }}
12 changes: 9 additions & 3 deletions helm/streampark/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
# limitations under the License.
#

# When enabled RBAC is only created for said namespaces, otherwise it is done for the cluster scope.
# watchNamespaces: ["streampark"]

image:
repository: "apache/streampark"
pullPolicy: "IfNotPresent"
Expand All @@ -26,6 +23,8 @@ image:

rbac:
create: true
## When enabled RBAC is only created for said namespaces, otherwise it is done for the cluster scope.
# watchNamespaces: ["streampark"]

spec:
container:
Expand Down Expand Up @@ -107,6 +106,9 @@ spec:
failureThreshold: "3"
successThreshold: "1"

volumeMounts: []
volumes: []

ingress:
enabled: true
host: "streampark.apache.org"
Expand All @@ -120,6 +122,10 @@ ingress:
nginx.ingress.kubernetes.io/configuration-snippet: 'rewrite ^(/streampark)$ $1/ permanent;',
kubernetes.io/ingress.class: "nginx"
}
tls:
enabled: false
## Secret that contains the TLS certificate
tlsSecretName: streampark-tls-secret

service:
## type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer
Expand Down
Loading