Skip to content

Commit

Permalink
Remove license checks from webhook server
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Apr 2, 2024
1 parent 0a38e60 commit bd17c75
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 196 deletions.
14 changes: 5 additions & 9 deletions apis/installer/v1alpha1/kubevault_webhook_server_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,11 @@ type KubevaultWebhookServerSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int32 `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
// +optional
License string `json:"license"`
// +optional
LicenseSecretName string `json:"licenseSecretName"`
Server Container `json:"server"`
ImagePullPolicy string `json:"imagePullPolicy"`
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int32 `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
Server Container `json:"server"`
ImagePullPolicy string `json:"imagePullPolicy"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
//+optional
Expand Down
80 changes: 39 additions & 41 deletions charts/kubevault-webhook-server/README.md

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions charts/kubevault-webhook-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,6 @@ Create the name of the service account to use
{{- end }}
{{- end }}

{{/*
Returns the appscode license
*/}}
{{- define "appscode.license" -}}
{{- .Values.license }}
{{- end }}

{{/*
Returns the appscode license secret name
*/}}
{{- define "appscode.licenseSecretName" -}}
{{- if .Values.licenseSecretName }}
{{- .Values.licenseSecretName -}}
{{- else if .Values.license }}
{{- printf "%s-license" (include "kubevault-webhook-server.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Returns the registry used for operator docker image
*/}}
Expand Down
13 changes: 0 additions & 13 deletions charts/kubevault-webhook-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ spec:
- --enable-mutating-webhook={{ .Values.apiserver.enableMutatingWebhook }}
- --enable-validating-webhook={{ .Values.apiserver.enableValidatingWebhook }}
- --use-kubeapiserver-fqdn-for-aks={{ .Values.apiserver.useKubeapiserverFqdnForAks }}
{{- if include "appscode.licenseSecretName" . }}
- --license-file=/var/run/secrets/appscode/license/key.txt
{{- end }}
env:
- name: POD_NAME
valueFrom:
Expand All @@ -70,10 +67,6 @@ spec:
name: tmpdir
- mountPath: /var/serving-cert
name: serving-cert
{{- if include "appscode.licenseSecretName" . }}
- mountPath: /var/run/secrets/appscode/license
name: license
{{- end }}
{{- if .Values.apiserver.healthcheck.enabled }}
readinessProbe:
httpGet:
Expand All @@ -98,12 +91,6 @@ spec:
secret:
defaultMode: 420
secretName: {{ include "kubevault-webhook-server.fullname" . }}-apiserver-cert
{{- if include "appscode.licenseSecretName" . }}
- name: license
secret:
defaultMode: 420
secretName: {{ include "appscode.licenseSecretName" . }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if or .Values.tolerations $criticalAddon }}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions charts/kubevault-webhook-server/templates/license.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions charts/kubevault-webhook-server/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,6 @@ properties:
items:
type: string
type: array
license:
type: string
licenseSecretName:
type: string
logLevel:
format: int32
type: integer
Expand Down
11 changes: 0 additions & 11 deletions charts/kubevault-webhook-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ nameOverride: ""
fullnameOverride: ""
# Number of KubeVault webhook server replicas to create (only 1 is supported)
replicaCount: 1
# License for the product.
# Get a license by following the steps from [here](https://kubevault.com/docs/latest/setup/install/enterprise/#get-a-trial-license).
# Example:
# helm install appscode/kubevault-ops-manager \
# --set-file license=/path/to/license/file
# or
# helm install appscode/kubevault-ops-manager \
# --set license=<license file content>
license: ""
# Name of Secret with the license as key.txt key
licenseSecretName: ""
# Docker registry fqdn used to pull docker images
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ghcr.io
Expand Down
4 changes: 0 additions & 4 deletions charts/kubevault/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2516,10 +2516,6 @@ properties:
items:
type: string
type: array
license:
type: string
licenseSecretName:
type: string
logLevel:
format: int32
type: integer
Expand Down

0 comments on commit bd17c75

Please sign in to comment.