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 Mar 17, 2024
1 parent 9c198ee commit 6bfd86d
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 220 deletions.
16 changes: 6 additions & 10 deletions apis/installer/v1alpha1/kubedb_webhook_server_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,12 @@ type KubedbWebhookServerSpec 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"`
FeatureGates map[string]bool `json:"featureGates"`
ImagePullPolicy string `json:"imagePullPolicy"`
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int32 `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
Server Container `json:"server"`
FeatureGates map[string]bool `json:"featureGates"`
ImagePullPolicy string `json:"imagePullPolicy"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
//+optional
Expand Down
122 changes: 60 additions & 62 deletions charts/kubedb-webhook-server/README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion charts/kubedb-webhook-server/ci/ci-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# https://github.com/helm/charts/blob/master/test/README.md#providing-custom-test-values
license: ""
server:
securityContext:
seccompProfile:
Expand Down
18 changes: 0 additions & 18 deletions charts/kubedb-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 "kubedb-webhook-server.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Returns the registry used for operator docker image
*/}}
Expand Down
13 changes: 0 additions & 13 deletions charts/kubedb-webhook-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,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 @@ -71,10 +68,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 @@ -99,12 +92,6 @@ spec:
secret:
defaultMode: 420
secretName: {{ include "kubedb-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/kubedb-webhook-server/templates/license.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions charts/kubedb-webhook-server/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,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/kubedb-webhook-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ nameOverride: ""
fullnameOverride: ""
# Number of KubeDB 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://kubedb.run/docs/latest/setup/install/enterprise#get-a-trial-license).
# Example:
# helm install appscode/kubedb-ops-manager \
# --set-file license=/path/to/license/file
# or
# helm install appscode/kubedb-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 KubeDB related images
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ghcr.io
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following table lists the configurable parameters of the `kubedb` chart and
| global.featureGates.ZooKeeper | | <code>false</code> |
| global.monitoring.agent | Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin") | <code>""</code> |
| global.monitoring.serviceMonitor.labels | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`. | <code>{"monitoring.appscode.com/prometheus":"auto"}</code> |
| petset.enabled | If enabled, installs the petset chart | <code>false</code> |
| petset.enabled | If enabled, installs the petset chart | <code>true</code> |
| sidekick.enabled | If enabled, installs the sidekick chart | <code>true</code> |
| supervisor.enabled | If enabled, installs the supervisor chart | <code>false</code> |
| kubedb-crd-manager.enabled | If enabled, installs the kubedb-crd-manager chart | <code>true</code> |
Expand Down
4 changes: 0 additions & 4 deletions charts/kubedb/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8588,10 +8588,6 @@ properties:
items:
type: string
type: array
license:
type: string
licenseSecretName:
type: string
logLevel:
format: int32
type: integer
Expand Down

0 comments on commit 6bfd86d

Please sign in to comment.