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

[WIP] Add support to read license from secret #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions chart/inlets-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ spec:
env:
- name: client_image
value: "{{.Values.clientImage}}"
{{- if and .Values.proLicenseSecret.name .Values.proLicenseSecret.key }}
- name: LICENSE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could we mount the secret instead for consistency between the projects.

valueFrom:
secretKeyRef:
name: {{ .Values.proLicenseSecret.name }}
key: {{ .Values.proLicenseSecret.key }}
{{- end }}
volumeMounts:
- mountPath: /var/secrets/inlets/
name: inlets-access-key
Expand Down
4 changes: 4 additions & 0 deletions chart/inlets-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ vpcId: ""
subnetId: ""

# Only provide LoadBalancers for Services annotated with "dev.inlets.manage=true"
proLicenseSecret:
name: ""
key: ""

annotatedOnly: false

image: "ghcr.io/inlets/inlets-operator:0.14.1"
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func main() {

log.Printf("Client image: %s\n", infra.GetInletsClientImage())

if len(infra.ProConfig.License) == 0 {
infra.ProConfig.License = os.Getenv("LICENSE")
}

if _, err := infra.ProConfig.GetLicenseKey(); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
os.Exit(1)
Expand Down