Skip to content

Commit

Permalink
Merge pull request #2 from JeferCatarina/chore/apm-app-chart-2
Browse files Browse the repository at this point in the history
Chore/apm app chart 2
  • Loading branch information
falpires authored Jul 9, 2024
2 parents 9db6895 + c01ead3 commit 06be873
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 19 deletions.
Binary file modified chart/apm/apm-0.0.1.tgz
Binary file not shown.
6 changes: 6 additions & 0 deletions chart/apm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "apm.chart" . }}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Epinio labels
*/}}
{{- define "apm.epinioLabels" -}}
{{- if .Values.epinio }}
epinio.io/configuration: "true"
epinio.io/configuration-origin: {{ .Values.epinio.serviceName }}
Expand Down
13 changes: 13 additions & 0 deletions chart/apm/templates/apm-access-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: "{{ include "apm.fullname" . }}-apm-access"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
data:
APM_UI: {{ printf "https://%s-jaeger.%s.%s" (include "apm.fullname" .) .Release.Namespace .Values.ingress.domain | b64enc }}
APM_SERVER: {{ printf "http://%s-otel-collector:4318" (include "apm.fullname" .) | b64enc }}
1 change: 1 addition & 0 deletions chart/apm/templates/jaeger-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ metadata:
name: "{{ include "apm.fullname" . }}-oauth2"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/apm/templates/jaeger-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: "{{ include "apm.fullname" . }}-jaeger"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/apm/templates/jaeger-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: "data-{{ include "apm.fullname" . }}-jaeger"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
11 changes: 8 additions & 3 deletions chart/apm/templates/oauth2-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: "{{ include "apm.fullname" . }}-oauth2"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -35,9 +36,13 @@ spec:
- --allowed-group="/{{ .Release.Namespace }}"
- --code-challenge-method=S256
- --http-address=0.0.0.0:4180
envFrom:
- secretRef:
name: "{{ include "apm.fullname" . }}-oauth2"
env:
- name: OAUTH2_PROXY_CLIENT_ID
value: "{{ .Values.keycloak.clientId }}"
- name: OAUTH2_PROXY_CLIENT_SECRET
value: "{{ .Values.keycloak.clientSecret }}"
- name: OAUTH2_PROXY_COOKIE_SECRET
value: "{{ .Values.keycloak.cookieSecret }}"
image: quay.io/oauth2-proxy/oauth2-proxy:latest
imagePullPolicy: Always
name: oauth2-proxy
Expand Down
14 changes: 0 additions & 14 deletions chart/apm/templates/oauth2-secrets.yaml

This file was deleted.

1 change: 1 addition & 0 deletions chart/apm/templates/oauth2-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: "{{ include "apm.fullname" . }}-oauth2"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/apm/templates/otel-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: "{{ include "apm.fullname" . }}-otel"
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/apm/templates/otel-instrumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
name: auto-instrumentation
labels:
{{- include "apm.labels" . | nindent 4 }}
{{- include "apm.epinioLabels" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- toYaml .Values.commonLabels | nindent 4 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion chart/application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The helm chart for epinio applications to be deployed by
icon: https://raw.githubusercontent.com/epinio/helm-charts/main/assets/epinio.png
home: https://github.com/epinio/epinio
type: application
version: 0.0.34
version: 0.0.35
keywords:
- epinio
- paas
Binary file added chart/application/custom-application-0.0.35.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion chart/application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
{{- with .Values.epinio.start }}
epinio.io/start: {{ . | quote }}
{{- end }}
{{- if .Values.userConfig.apmAutoinstrument }}
{{- if and .Values.userConfig.apmAutoinstrument .Values.userConfig.apmAutoinstrumentEnabled }}
instrumentation.opentelemetry.io/inject-{{ .Values.userConfig.apmAutoinstrument }}: "true"
{{- end }}
labels:
Expand Down

0 comments on commit 06be873

Please sign in to comment.