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

Feature/remote insights update #578

Merged
merged 26 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions charts/lagoon-remote/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# This is the chart version. This version number should be incremented each
# time you make changes to the chart and its templates, including the app
# version.
version: 0.85.0
version: 0.86.0

dependencies:
- name: lagoon-build-deploy
Expand All @@ -45,4 +45,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: update lagoon-build-deploy to v0.26.1
description: Changes permissions, adds service, updates secret for insights-remote
21 changes: 15 additions & 6 deletions charts/lagoon-remote/templates/insights-remote.clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ metadata:
labels:
{{- include "lagoon-remote.insightsRemote.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- "*"
- verbs:
- '*'
apiGroups:
- ''
resources:
- configmaps
- secrets
- verbs:
- get
- watch
- list
apiGroups:
- ''
resources:
- namespaces
{{- end }}
17 changes: 13 additions & 4 deletions charts/lagoon-remote/templates/insights-remote.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,24 @@ spec:
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}-rabbitmqsecret
key: password
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}
key: RABBITMQ_PASSWORD
- name: RABBITMQ_USERNAME
valueFrom:
secretKeyRef:
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}-rabbitmqsecret
key: username
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}
key: RABBITMQ_USERNAME
- name: INSIGHTS_TOKEN_SECRET
valueFrom:
secretKeyRef:
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}
key: INSIGHTS_TOKEN_SECRET
resources:
{{- toYaml .Values.insightsRemote.resources | nindent 12 }}
ports:
- name: insights-ws
containerPort: 8888
protocol: TCP
{{- with .Values.insightsRemote.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
13 changes: 9 additions & 4 deletions charts/lagoon-remote/templates/insights-remote.secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
{{- $rabbitMQUsername := coalesce .Values.global.rabbitMQUsername .Values.insightsRemote.rabbitMQUsername }}
{{- $rabbitMQPassword := coalesce .Values.global.rabbitMQPassword .Values.insightsRemote.rabbitMQPassword }}

{{- $data := index (lookup "v1" "Secret" .Release.Namespace (include "lagoon-remote.insightsRemote.fullname" .)) "data" | default dict }}
{{- $insightsTokenSecret := coalesce .Values.insightsRemote.insightsTokenSecret (ternary (randAlpha 32) (index $data "INSIGHTS_TOKEN_SECRET" | default "" | b64dec) (index $data "INSIGHTS_TOKEN_SECRET" | empty)) }}

apiVersion: v1
kind: Secret
metadata:
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}-rabbitmqsecret
type: kubernetes.io/basic-auth
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}
type: Opaque
stringData:
username: {{ required "A valid rabbitMQUsername required!" $rabbitMQUsername | quote }}
password: {{ required "A valid rabbitMQPassword required!" $rabbitMQPassword | quote }}
RABBITMQ_USERNAME: {{ required "A valid rabbitMQUsername required!" $rabbitMQUsername | quote }}
RABBITMQ_PASSWORD: {{ required "A valid rabbitMQPassword required!" $rabbitMQPassword | quote }}
INSIGHTS_TOKEN_SECRET: {{ $insightsTokenSecret | quote }}

{{- end }}
15 changes: 15 additions & 0 deletions charts/lagoon-remote/templates/insights-remote.service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "lagoon-remote.insightsRemote.fullname" . }}
labels:
{{- include "lagoon-remote.insightsRemote.labels" . | nindent 4 }}
spec:
type: {{ .Values.insightsRemote.service.type }}
ports:
- port: {{ .Values.insightsRemote.service.port }}
targetPort: 8888
protocol: TCP
name: insights-ws
selector:
{{- include "lagoon-remote.insightsRemote.selectorLabels" . | nindent 4 }}
11 changes: 10 additions & 1 deletion charts/lagoon-remote/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,15 @@ insightsRemote:

replicaCount: 1

# This is the secret used to sign JWT's injected into environments
# This shouldn't need to be changed in most circumstances - here for completion
# insightsTokenSecret: ""

image:
repository: uselagoon/insights-remote
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.4"
tag: "v0.0.7"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -294,6 +298,11 @@ insightsRemote:

affinity: {}

service:
type: ClusterIP
port: 80


# the nats chart is a subchart which is configured for use by lagoon-remote
nats:
enabled: false
Expand Down
Loading