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

add optional secret generation for license keys. #10

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion charts/netobserv/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: netobserv
description: ElastiFlow NetObserv
type: application
version: 0.0.8
version: 0.0.9
appVersion: 6.4.3

keywords:
Expand Down
7 changes: 7 additions & 0 deletions charts/netobserv/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ spec:
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.license.createSecret -}}
- name: EF_FLOW_LICENSE_KEY
valueFrom:
secretKeyRef:
name: netobserv-license
key: license
{{- end }}
ports:
- name: udp
containerPort: {{ .Values.service.port }}
Expand Down
11 changes: 11 additions & 0 deletions charts/netobserv/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.license.createSecret -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.license.secretRef | default "netobserv-license" }}
labels:
{{- include "netobserv.labels" . | nindent 4 }}
type: Opaque
data:
license: {{ .Values.license.licenseKey }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/netobserv/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ env:
# EF_OUTPUT_GENERIC_HTTP_ADDRESSES: ''
# EF_OUTPUT_RISKIQ_ENABLE: 'false'

license:
# Specifies whether a secret should be created. If you don't have a license, no need to create a license secret.
createSecret: false
# Secret name to be used for the license. If empty, the secret name defaults to `netobserv-license`
# If no secret with a matching name exists, the value will be set from `licenseKey`.instead.
secretRef: ""
# Set license key, if not set, value from secret will be used
licenseKey: ""

imagePullSecrets: []
nameOverride: ""
Expand Down