Skip to content

Commit

Permalink
Merge pull request #19 from 7knot/support/update-panope
Browse files Browse the repository at this point in the history
support(panope): update panope chart.
  • Loading branch information
yamagai authored Mar 9, 2022
2 parents 5912bf0 + 8852f5e commit 6e71874
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/panope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.2
version: 0.3.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/panope/templates/agent/cluterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules:
- get
- list
- watch
- patch
- update
- delete
- apiGroups:
- ""
Expand Down
2 changes: 1 addition & 1 deletion charts/panope/templates/observer/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rules:
- get
- list
- watch
- patch
- update
- apiGroups:
- ""
resources:
Expand Down
4 changes: 4 additions & 0 deletions charts/panope/templates/observer/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ metadata:
data:
HEALTH_CHECK_PORT: {{ .Values.observer.configMap.healthCheckPort | quote }}
METRICS_PORT: {{ .Values.observer.configMap.metricsPort | quote }}
OBSERVER_SUBJECT: {{ required "Invalid value. Values.observer.configMap.observerSubject is required!" .Values.observer.configMap.observerSubject | quote }}
CONTROLLER_SUBJECT: {{ required "Invalid value. Values.observer.configMap.controllerSubject is required!" .Values.observer.configMap.controllerSubject | quote }}
NATS_URI: {{ required "Invalid value. Values.observer.configMap.natsUri is required!" .Values.observer.configMap.natsUri | quote }}

16 changes: 16 additions & 0 deletions charts/panope/templates/observer/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
volumes:
- secret:
secretName: {{ include "panope.observer.fullname" . }}
name: {{ include "panope.observer.fullname" . }}-creds
# necessary to hit the node's metadata server when using Workload Identity
hostNetwork: true
terminationGracePeriodSeconds: 30 # for graceful shutdown
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -71,6 +78,15 @@ spec:
envFrom:
- configMapRef:
name: {{ include "panope.observer.fullname" . }}-env
volumeMounts:
- mountPath: /observer/nats.creds
name: {{ include "panope.observer.fullname" . }}-creds
subPath: nats.creds
# necessary to get the node's preempted status before handle the SIGTERM signal
lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 5"]
{{- with .Values.observer.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/panope/templates/observer/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "panope.observer.fullname" . }}
labels:
{{- include "panope.observer.labels" . | nindent 4 }}
{{- with .Values.observer.secret.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.observer.secret.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
type: Opaque
data:
nats.creds: {{ required "Invalid value. Values.observer.secret.nats.credentials is required!" .Values.observer.secret.nats.credentials | b64enc }}
29 changes: 27 additions & 2 deletions charts/panope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ agent:
annotations: {}

natsUri: "wss://nats.panope.net:443"
agentSubject:
controllerSubject:
agentSubject: ""
controllerSubject: ""
healthCheckPort: "4444"
metricsPort: "2112"
# configure the maximum number of nodes in the cluster as a percentage
Expand Down Expand Up @@ -203,12 +203,37 @@ observer:
# Annotations to add to the deployment
annotations: {}

secret:
# labels to add to the secret
labels: {}
# annotations to add to the secret
annotations: {}

nats:
credentials:
# credentials: |
# -----BEGIN NATS USER JWT-----
# ------END NATS USER JWT------

# ************************* IMPORTANT *************************
# NKEY Seed printed below can be used to sign and prove identity.
# NKEYs are sensitive and should be treated as secrets.

# -----BEGIN USER NKEY SEED-----
# ------END USER NKEY SEED------

# *************************************************************


configMap:
# labels to add to the config map
labels: {}
# annotations to add to the config map
annotations: {}

observerSubject: ""
controllerSubject: ""
natsUri: "wss://nats.panope.net:443"
healthCheckPort: "4444"
metricsPort: "2112"

Expand Down

0 comments on commit 6e71874

Please sign in to comment.