Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
refactor: restructure values.yaml (#98)
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <reaver@flomesh.io>

Signed-off-by: Lin Yang <reaver@flomesh.io>
  • Loading branch information
reaver-flomesh committed Sep 5, 2022
1 parent a12747d commit cc49887
Show file tree
Hide file tree
Showing 8 changed files with 300 additions and 2,143 deletions.
12 changes: 6 additions & 6 deletions charts/fsm/templates/ingress-pipy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ spec:
image: {{ include "fsm.ingress-pipy.image" . }}
imagePullPolicy: {{ .Values.fsm.image.pullPolicy }}
ports:
{{- if and .Values.fsm.ingress.http (and (not (empty .Values.fsm.ingress.service.port)) (not (empty .Values.fsm.ingress.service.containerPort))) }}
{{- if and .Values.fsm.ingress.http.enabled (and (not (empty .Values.fsm.ingress.http.port)) (not (empty .Values.fsm.ingress.http.containerPort))) }}
- name: http
containerPort: {{ .Values.fsm.ingress.service.containerPort }}
containerPort: {{ .Values.fsm.ingress.http.containerPort }}
{{- end }}
{{- if and .Values.fsm.ingress.tls.enabled (and (not (empty .Values.fsm.ingress.service.tlsPort)) (not (empty .Values.fsm.ingress.service.containerTlsPort))) }}
{{- if and .Values.fsm.ingress.tls.enabled (and (not (empty .Values.fsm.ingress.tls.port)) (not (empty .Values.fsm.ingress.tls.containerPort))) }}
- name: https
containerPort: {{ .Values.fsm.ingress.service.containerTlsPort }}
containerPort: {{ .Values.fsm.ingress.tls.containerPort }}
{{- end }}
- name: health
containerPort: 8081
Expand All @@ -71,12 +71,12 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 5
tcpSocket:
port: {{ .Values.fsm.ingress.service.containerPort }}
port: {{ .Values.fsm.ingress.http.containerPort }}
readinessProbe:
initialDelaySeconds: 5
timeoutSeconds: 5
tcpSocket:
port: {{ .Values.fsm.ingress.service.containerPort }}
port: {{ .Values.fsm.ingress.http.containerPort }}
terminationGracePeriodSeconds: 60
serviceAccountName: {{ include "fsm.serviceAccountName" . }}
{{- with .Values.fsm.image.pullSecrets }}
Expand Down
20 changes: 10 additions & 10 deletions charts/fsm/templates/ingress-pipy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ spec:
type: {{ .Values.fsm.ingress.service.type }}
{{- $setNodePorts := (or (eq .Values.fsm.ingress.service.type "NodePort") (eq .Values.fsm.ingress.service.type "LoadBalancer")) }}
ports:
{{- if and .Values.fsm.ingress.http (and (not (empty .Values.fsm.ingress.service.port)) (not (empty .Values.fsm.ingress.service.containerPort))) }}
{{- if and .Values.fsm.ingress.http.enabled (and (not (empty .Values.fsm.ingress.http.port)) (not (empty .Values.fsm.ingress.http.containerPort))) }}
- name: http
port: {{ .Values.fsm.ingress.service.port }}
port: {{ .Values.fsm.ingress.http.port }}
protocol: TCP
targetPort: {{ .Values.fsm.ingress.service.containerPort }}
{{- if (and $setNodePorts (not (empty .Values.fsm.ingress.service.nodePorts.http))) }}
nodePort: {{ .Values.fsm.ingress.service.nodePorts.http }}
targetPort: {{ .Values.fsm.ingress.http.containerPort }}
{{- if (and $setNodePorts (not (empty .Values.fsm.ingress.http.nodePort))) }}
nodePort: {{ .Values.fsm.ingress.http.nodePort }}
{{- end }}
{{- end }}
{{- if and .Values.fsm.ingress.tls.enabled (and (not (empty .Values.fsm.ingress.service.tlsPort)) (not (empty .Values.fsm.ingress.service.containerTlsPort))) }}
{{- if and .Values.fsm.ingress.tls.enabled (and (not (empty .Values.fsm.ingress.tls.port)) (not (empty .Values.fsm.ingress.tls.containerPort))) }}
- name: https
port: {{ .Values.fsm.ingress.service.tlsPort }}
port: {{ .Values.fsm.ingress.tls.port }}
protocol: TCP
targetPort: {{ .Values.fsm.ingress.service.containerTlsPort }}
{{- if (and $setNodePorts (not (empty .Values.fsm.ingress.service.nodePorts.https))) }}
nodePort: {{ .Values.fsm.ingress.service.nodePorts.https }}
targetPort: {{ .Values.fsm.ingress.tls.containerPort }}
{{- if (and $setNodePorts (not (empty .Values.fsm.ingress.tls.nodePort))) }}
nodePort: {{ .Values.fsm.ingress.tls.nodePort }}
{{- end }}
{{- end }}
selector:
Expand Down
2,347 changes: 258 additions & 2,089 deletions charts/fsm/values.schema.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions charts/fsm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,28 @@ fsm:
#
# -- FSM Pipy Ingress Controller parameters
ingress:
name: fsm-ingress-pipy
className: "pipy"
enabled: true
namespaced: false
http: true
http:
enabled: true
port: 80
containerPort: 8000
nodePort: 30508
tls :
enabled: false
port: 443
containerPort: 8443
nodePort: 30607
sslPassthrough:
enabled: false
upstreamPort: 443
className: "pipy"
name: fsm-ingress-pipy
# -- FSM Pipy Ingress Controller's replica count (ignored when autoscale.enable is true)
replicaCount: 1
service:
name: fsm-ingress-pipy-controller
type: LoadBalancer
port: 80
tlsPort: 443
containerPort: 8000
containerTlsPort: 8443
nodePorts:
http: "30508"
https: "30607"
annotations: {}
# -- FSM Pipy Ingress Controller's container resource parameters.
resources:
Expand All @@ -273,12 +273,12 @@ fsm:
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext:
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
securityContext: {}
# capabilities:
# add:
# - NET_BIND_SERVICE
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
Expand Down
8 changes: 4 additions & 4 deletions charts/namespaced-ingress/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ spec:
imagePullPolicy: {{ .Values.fsm.image.pullPolicy }}
ports:
- name: http
containerPort: {{ default .Values.fsm.ingress.service.containerPort .Values.nsig.spec.http.port.targetPort }}
containerPort: {{ default .Values.fsm.ingress.http.containerPort .Values.nsig.spec.http.port.targetPort }}
- name: https
containerPort: {{ default .Values.fsm.ingress.service.containerTlsPort .Values.nsig.spec.tls.port.targetPort }}
containerPort: {{ default .Values.fsm.ingress.tls.containerPort .Values.nsig.spec.tls.port.targetPort }}
- name: health
containerPort: 8081
args:
Expand All @@ -80,12 +80,12 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 5
tcpSocket:
port: {{ .Values.fsm.ingress.service.containerPort }}
port: {{ .Values.fsm.ingress.http.containerPort }}
readinessProbe:
initialDelaySeconds: 5
timeoutSeconds: 5
tcpSocket:
port: {{ .Values.fsm.ingress.service.containerPort }}
port: {{ .Values.fsm.ingress.http.containerPort }}
terminationGracePeriodSeconds: 60
serviceAccountName: {{ include "fsm.namespaced-ingress.serviceAccountName" . }}
{{- with .Values.fsm.image.pullSecrets }}
Expand Down
8 changes: 4 additions & 4 deletions charts/namespaced-ingress/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ spec:
ports:
{{- if .Values.nsig.spec.http.enabled }}
- name: http
port: {{ default .Values.fsm.ingress.service.port .Values.nsig.spec.http.port.port }}
port: {{ default .Values.fsm.ingress.http.port .Values.nsig.spec.http.port.port }}
protocol: {{ default "TCP" .Values.nsig.spec.tls.port.protocol }}
targetPort: {{ default .Values.fsm.ingress.service.containerPort .Values.nsig.spec.http.port.targetPort }}
targetPort: {{ default .Values.fsm.ingress.http.containerPort .Values.nsig.spec.http.port.targetPort }}
{{- if (and $setNodePorts (not (empty .Values.nsig.spec.http.port.nodePort))) }}
nodePort: {{ .Values.nsig.spec.http.port.nodePort }}
{{- end }}
{{- end }}
{{- if .Values.nsig.spec.tls.enabled }}
- name: https
port: {{ default .Values.fsm.ingress.service.tlsPort .Values.nsig.spec.tls.port.port }}
port: {{ default .Values.fsm.ingress.tls.port .Values.nsig.spec.tls.port.port }}
protocol: {{ default "TCP" .Values.nsig.spec.tls.port.protocol }}
targetPort: {{ default .Values.fsm.ingress.service.containerTlsPort .Values.nsig.spec.tls.port.targetPort }}
targetPort: {{ default .Values.fsm.ingress.tls.containerPort .Values.nsig.spec.tls.port.targetPort }}
{{- if (and $setNodePorts (not (empty .Values.nsig.spec.tls.port.nodePort))) }}
nodePort: {{ .Values.nsig.spec.tls.port.nodePort }}
{{- end }}
Expand Down
8 changes: 1 addition & 7 deletions deploy/fsm-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ spec:
name: ingress
ports:
- containerPort: 8000
name: ingress
name: http
- containerPort: 8081
name: health
readinessProbe:
Expand All @@ -2410,12 +2410,6 @@ spec:
requests:
cpu: "0.5"
memory: 128M
securityContext:
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
initContainers:
- command:
- curl
Expand Down
8 changes: 1 addition & 7 deletions deploy/fsm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ spec:
name: ingress
ports:
- containerPort: 8000
name: ingress
name: http
- containerPort: 8081
name: health
readinessProbe:
Expand All @@ -2410,12 +2410,6 @@ spec:
requests:
cpu: "0.5"
memory: 128M
securityContext:
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
initContainers:
- command:
- curl
Expand Down

0 comments on commit cc49887

Please sign in to comment.