Skip to content

Commit

Permalink
🎨 style(chart): Reformat yaml files to always include whitespace in t…
Browse files Browse the repository at this point in the history
…emplate strings
  • Loading branch information
W3D3 committed Oct 23, 2024
1 parent 63d8fdd commit f122340
Show file tree
Hide file tree
Showing 15 changed files with 218 additions and 218 deletions.
26 changes: 13 additions & 13 deletions chart/templates/ad-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: unguard-{{.Values.adService.name}}
name: unguard-{{ .Values.adService.name }}
labels:
app.kubernetes.io/name: {{.Values.adService.name}}
app.kubernetes.io/name: {{ .Values.adService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
type: {{ .Values.adService.service.type }}
selector:
app.kubernetes.io/name: {{.Values.adService.name}}
app.kubernetes.io/name: {{ .Values.adService.name }}
app.kubernetes.io/part-of: unguard
ports:
{{- .Values.adService.service.ports | toYaml | nindent 4 }}
Expand All @@ -33,31 +33,31 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: unguard-{{.Values.adService.name}}
name: unguard-{{ .Values.adService.name }}
labels:
app.kubernetes.io/name: {{.Values.adService.name}}
app.kubernetes.io/name: {{ .Values.adService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{.Values.adService.name}}
app.kubernetes.io/name: {{ .Values.adService.name }}
app.kubernetes.io/part-of: unguard
strategy:
type: {{.Values.adService.deployment.strategy.type}}
type: {{ .Values.adService.deployment.strategy.type }}
template:
metadata:
labels:
app.kubernetes.io/name: {{.Values.adService.name}}
app.kubernetes.io/name: {{ .Values.adService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 8 }}
spec:
containers:
- name: {{.Values.adService.name}}
image: {{.Values.adService.deployment.container.image.repository}}:{{.Values.adService.deployment.container.image.tag}}
imagePullPolicy: {{.Values.adService.deployment.container.image.pullPolicy}}
- name: {{ .Values.adService.name }}
image: {{ .Values.adService.deployment.container.image.repository }}:{{ .Values.adService.deployment.container.image.tag }}
imagePullPolicy: {{ .Values.adService.deployment.container.image.pullPolicy }}
ports:
- containerPort: {{.Values.adService.deployment.container.ports.containerPort}}
- containerPort: {{ .Values.adService.deployment.container.ports.containerPort }}
env:
- name: ASPNETCORE_ENVIRONMENT
value: {{ quote .Values.adService.deployment.container.env.ASPNETCORE_ENVIRONMENT }}
Expand All @@ -68,7 +68,7 @@ spec:
- name: USER_AUTH_SERVICE_ADDRESS
value: {{ quote .Values.adService.deployment.container.env.USER_AUTH_SERVICE_ADDRESS }}
- name: JAEGER_SERVICE_NAME
value: {{quote (printf "unguard-%s" .Values.adService.name) }}
value: {{ quote (printf "unguard-%s" .Values.adService.name) }}
- name: JAEGER_AGENT_HOST
value: {{ quote (printf "%s-%s" .Values.jaeger.name .Values.adService.deployment.container.env.JAEGER_AGENT_HOST) }}
- name: JAEGER_SAMPLER_TYPE
Expand Down
28 changes: 14 additions & 14 deletions chart/templates/envoy-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: unguard-{{.Values.envoyProxy.name}}
name: unguard-{{ .Values.envoyProxy.name }}
labels:
app.kubernetes.io/name: {{.Values.envoyProxy.name}}
app.kubernetes.io/name: {{ .Values.envoyProxy.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
{{if .Values.aws.enabled}}
{{ if .Values.aws.enabled }}
type: NodePort
{{else}}
{{ else }}
type: {{ .Values.envoyProxy.service.type }}
{{end}}
{{ end }}
selector:
app.kubernetes.io/name: {{.Values.envoyProxy.name}}
app.kubernetes.io/name: {{ .Values.envoyProxy.name }}
app.kubernetes.io/part-of: unguard
ports:
{{- .Values.envoyProxy.service.ports | toYaml | nindent 4 }}
Expand All @@ -38,28 +38,28 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: unguard-{{.Values.envoyProxy.name}}
name: unguard-{{ .Values.envoyProxy.name }}
labels:
app.kubernetes.io/name: {{.Values.envoyProxy.name}}
app.kubernetes.io/name: {{ .Values.envoyProxy.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{.Values.envoyProxy.name}}
app.kubernetes.io/name: {{ .Values.envoyProxy.name }}
app.kubernetes.io/part-of: unguard
strategy:
type: {{.Values.envoyProxy.deployment.strategy.type}}
type: {{ .Values.envoyProxy.deployment.strategy.type }}
template:
metadata:
labels:
app.kubernetes.io/name: {{.Values.envoyProxy.name}}
app.kubernetes.io/name: {{ .Values.envoyProxy.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 8 }}
spec:
containers:
- name: {{.Values.envoyProxy.name}}
image: {{.Values.envoyProxy.deployment.container.image.repository}}:{{.Values.envoyProxy.deployment.container.image.tag}}
imagePullPolicy: {{.Values.envoyProxy.deployment.container.image.pullPolicy}}
- name: {{ .Values.envoyProxy.name }}
image: {{ .Values.envoyProxy.deployment.container.image.repository }}:{{ .Values.envoyProxy.deployment.container.image.tag }}
imagePullPolicy: {{ .Values.envoyProxy.deployment.container.image.pullPolicy }}
ports:
{{- .Values.envoyProxy.deployment.container.ports | toYaml | nindent 12 }}
26 changes: 13 additions & 13 deletions chart/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: unguard-{{.Values.frontend.name}}
name: unguard-{{ .Values.frontend.name }}
labels:
app.kubernetes.io/name: {{.Values.frontend.name}}
app.kubernetes.io/name: {{ .Values.frontend.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
type: {{ .Values.frontend.service.type }}
selector:
app.kubernetes.io/name: {{.Values.frontend.name}}
app.kubernetes.io/name: {{ .Values.frontend.name }}
app.kubernetes.io/part-of: unguard
ports:
{{- .Values.frontend.service.ports | toYaml | nindent 4 }}
Expand All @@ -34,31 +34,31 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: unguard-{{.Values.frontend.name}}
name: unguard-{{ .Values.frontend.name }}
labels:
app.kubernetes.io/name: {{.Values.frontend.name}}
app.kubernetes.io/name: {{ .Values.frontend.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{.Values.frontend.name}}
app.kubernetes.io/name: {{ .Values.frontend.name }}
app.kubernetes.io/part-of: unguard
strategy:
type: {{.Values.frontend.deployment.strategy.type}}
type: {{ .Values.frontend.deployment.strategy.type }}
template:
metadata:
labels:
app.kubernetes.io/name: {{.Values.frontend.name}}
app.kubernetes.io/name: {{ .Values.frontend.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 8 }}
spec:
containers:
- name: {{.Values.frontend.name}}
image: {{.Values.frontend.deployment.container.image.repository}}:{{.Values.frontend.deployment.container.image.tag}}
imagePullPolicy: {{.Values.frontend.deployment.container.image.pullPolicy}}
- name: {{ .Values.frontend.name }}
image: {{ .Values.frontend.deployment.container.image.repository }}:{{ .Values.frontend.deployment.container.image.tag }}
imagePullPolicy: {{ .Values.frontend.deployment.container.image.pullPolicy }}
ports:
- containerPort: {{.Values.frontend.deployment.container.ports.containerPort}}
- containerPort: {{ .Values.frontend.deployment.container.ports.containerPort }}
env:
- name: MICROBLOG_SERVICE_ADDRESS
value: {{ quote .Values.frontend.deployment.container.env.MICROBLOG_SERVICE_ADDRESS }}
Expand Down Expand Up @@ -87,7 +87,7 @@ spec:
- name: STATUS_SERVICE_BASE_PATH
value: {{ quote .Values.frontend.deployment.container.env.STATUS_SERVICE_BASE_PATH }}
- name: JAEGER_SERVICE_NAME
value: {{quote (printf "unguard-%s" .Values.frontend.name) }}
value: {{ quote (printf "unguard-%s" .Values.frontend.name) }}
- name: JAEGER_AGENT_HOST
value: {{ quote (printf "%s-%s" .Values.jaeger.name .Values.frontend.deployment.container.env.JAEGER_AGENT_HOST) }}
- name: JAEGER_SAMPLER_TYPE
Expand Down
22 changes: 11 additions & 11 deletions chart/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ limitations under the License.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: unguard-{{.Values.ingress.name}}
name: unguard-{{ .Values.ingress.name }}
labels:
app.kubernetes.io/name: {{.Values.ingress.name}}
app.kubernetes.io/name: {{ .Values.ingress.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
{{if .Values.aws.enabled}}
{{ if .Values.aws.enabled }}
annotations:
{{- .Values.aws.ingress.annotations | toYaml | nindent 4 }}
{{end}}
{{ end }}
spec:
rules:
{{if .Values.localDev.enabled}}
{{ if .Values.localDev.enabled }}
- host: unguard.kube
{{end}}
{{if .Values.localDev.enabled}}
{{ end }}
{{ if .Values.localDev.enabled }}
http:
{{end}}
{{if .Values.aws.enabled}}
{{ end }}
{{ if .Values.aws.enabled }}
- http:
{{end}}
{{ end }}
paths:
- path: /healthz
pathType: Prefix
Expand All @@ -52,4 +52,4 @@ spec:
name: unguard-envoy-proxy
port:
number: 8080
{{end}}
{{ end }}
30 changes: 15 additions & 15 deletions chart/templates/like-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: unguard-{{.Values.likeService.name}}
name: unguard-{{ .Values.likeService.name }}
labels:
app.kubernetes.io/name: {{.Values.likeService.name}}
app.kubernetes.io/name: {{ .Values.likeService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
type: {{ .Values.likeService.service.type }}
selector:
app.kubernetes.io/name: {{.Values.likeService.name}}
app.kubernetes.io/name: {{ .Values.likeService.name }}
app.kubernetes.io/part-of: unguard
ports:
{{- .Values.likeService.service.ports | toYaml | nindent 4 }}
Expand All @@ -33,31 +33,31 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: unguard-{{.Values.likeService.name}}
name: unguard-{{ .Values.likeService.name }}
labels:
app.kubernetes.io/name: {{.Values.likeService.name}}
app.kubernetes.io/name: {{ .Values.likeService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{.Values.likeService.name}}
app.kubernetes.io/name: {{ .Values.likeService.name }}
app.kubernetes.io/part-of: unguard
strategy:
type: {{.Values.likeService.deployment.strategy.type}}
type: {{ .Values.likeService.deployment.strategy.type }}
template:
metadata:
labels:
app.kubernetes.io/name: {{.Values.likeService.name}}
app.kubernetes.io/name: {{ .Values.likeService.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 8 }}
spec:
containers:
- name: {{.Values.likeService.name}}
image: {{.Values.likeService.deployment.container.image.repository}}:{{.Values.likeService.deployment.container.image.tag}}
imagePullPolicy: {{.Values.likeService.deployment.container.image.pullPolicy}}
- name: {{ .Values.likeService.name }}
image: {{ .Values.likeService.deployment.container.image.repository }}:{{ .Values.likeService.deployment.container.image.tag }}
imagePullPolicy: {{ .Values.likeService.deployment.container.image.pullPolicy }}
ports:
- containerPort: {{.Values.likeService.deployment.container.ports.containerPort}}
- containerPort: {{ .Values.likeService.deployment.container.ports.containerPort }}
env:
- name: SERVER_PORT
value: {{ quote .Values.likeService.deployment.container.env.SERVER_PORT }}
Expand All @@ -71,8 +71,8 @@ spec:
name: {{ tpl .Values.likeService.deployment.container.env.MARIADB_PASSWORD.secretKeyRef.name . }}
key: {{ tpl .Values.likeService.deployment.container.env.MARIADB_PASSWORD.secretKeyRef.key . }}
- name: JAEGER_SERVICE_NAME
value: {{quote (printf "unguard-%s" .Values.likeService.name) }}
{{if .Values.tracing.enabled}}
value: {{ quote (printf "unguard-%s" .Values.likeService.name) }}
{{ if .Values.tracing.enabled }}
- name: JAEGER_COLLECTOR_HOST
value: {{ quote (printf "%s-%s" .Values.jaeger.name .Values.likeService.deployment.container.env.JAEGER_COLLECTOR_HOST) }}
- name: JAEGER_PORT
Expand All @@ -81,4 +81,4 @@ spec:
value: {{ quote .Values.likeService.deployment.container.env.SERVICE_NAME }}
- name: JAEGER_DISABLED
value: {{ quote .Values.likeService.deployment.container.env.JAEGER_DISABLED }}
{{end}}
{{ end }}
24 changes: 12 additions & 12 deletions chart/templates/malicious-load-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{if .Values.maliciousLoadGenerator.enabled}}
{{ if .Values.maliciousLoadGenerator.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: unguard-{{.Values.maliciousLoadGenerator.name}}
name: unguard-{{ .Values.maliciousLoadGenerator.name }}
labels:
app.kubernetes.io/name: {{.Values.maliciousLoadGenerator.name}}
app.kubernetes.io/name: {{ .Values.maliciousLoadGenerator.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{.Values.maliciousLoadGenerator.name}}
app.kubernetes.io/name: {{ .Values.maliciousLoadGenerator.name }}
app.kubernetes.io/part-of: unguard
strategy:
type: {{.Values.maliciousLoadGenerator.deployment.strategy.type}}
type: {{ .Values.maliciousLoadGenerator.deployment.strategy.type }}
template:
metadata:
labels:
app.kubernetes.io/name: {{.Values.maliciousLoadGenerator.name}}
app.kubernetes.io/name: {{ .Values.maliciousLoadGenerator.name }}
app.kubernetes.io/part-of: unguard
{{ include "renderLabels" .Values.labels.common | indent 8 }}
spec:
terminationGracePeriodSeconds: {{.Values.maliciousLoadGenerator.deployment.terminationGracePeriodSeconds}}
restartPolicy: {{.Values.maliciousLoadGenerator.deployment.restartPolicy}}
terminationGracePeriodSeconds: {{ .Values.maliciousLoadGenerator.deployment.terminationGracePeriodSeconds }}
restartPolicy: {{ .Values.maliciousLoadGenerator.deployment.restartPolicy }}
containers:
- name: {{.Values.maliciousLoadGenerator.name}}
image: {{.Values.maliciousLoadGenerator.deployment.container.image.repository}}:{{.Values.maliciousLoadGenerator.deployment.container.image.tag}}
imagePullPolicy: {{.Values.maliciousLoadGenerator.deployment.container.image.pullPolicy}}
- name: {{ .Values.maliciousLoadGenerator.name }}
image: {{ .Values.maliciousLoadGenerator.deployment.container.image.repository }}:{{ .Values.maliciousLoadGenerator.deployment.container.image.tag }}
imagePullPolicy: {{ .Values.maliciousLoadGenerator.deployment.container.image.pullPolicy }}
env: # could add here run time as well
- name: FRONTEND_ADDR
value: {{ quote .Values.maliciousLoadGenerator.deployment.container.env.FRONTEND_ADDR }}
Expand All @@ -55,4 +55,4 @@ spec:
command: [ "/bin/sh", "-c" ]
# TODO: #22 Replace this endpoint with a proper health check endpoint
args: [ 'while [ $(curl -ksw "%{http_code}" "http://unguard-frontend:80/ui/img/logo.svg" -o /dev/null) -ne 200 ]; do sleep 5; echo "health check failed . Waiting for the service..."; done' ]
{{end}}
{{ end }}
Loading

0 comments on commit f122340

Please sign in to comment.