Skip to content

Commit

Permalink
Remove license checks from webhook server (#943)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Mar 17, 2024
1 parent 9c198ee commit 2e3407b
Show file tree
Hide file tree
Showing 69 changed files with 3,775 additions and 1,287 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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ require (
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gobeam/stringy v0.0.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20220608213341-c488b8fa1db3 // indirect
Expand Down Expand Up @@ -81,7 +81,7 @@ require (
gomodules.xyz/jsonpath v0.0.2 // indirect
gomodules.xyz/mergo v0.3.13 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/gomodules/sprig/v3 v3.2.3-0.20220405051441-0a8a99bac1b8 h1:rWzwdmHqkXrISyacSZcK9oLZIu5nIxesPwp9f8LpTvc=
github.com/gomodules/sprig/v3 v3.2.3-0.20220405051441-0a8a99bac1b8/go.mod h1:70huEoC6heWUvVNiFAnIRaEmvzAECK551RuYBCkT13w=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
Expand Down Expand Up @@ -253,8 +253,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
7 changes: 4 additions & 3 deletions vendor/github.com/golang/protobuf/ptypes/any.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2e3407b

Please sign in to comment.