Skip to content

Commit b7a7bec

Browse files
authoredOct 13, 2021
Remove vault support from the operator (banzaicloud#682)
1 parent 213d061 commit b7a7bec

28 files changed

+9
-2542
lines changed
 

‎.licensei.toml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ignored = [
3535
"github.com/prometheus/",
3636
"github.com/prometheus/client_golang",
3737
"gopkg.in/square/go-jose.v2",
38-
"github.com/hashicorp/vault/api",
3938
"github.com/hashicorp/golang-lru",
4039
"github.com/golang/groupcache",
4140
"github.com/beorn7/perks",

‎api/v1alpha1/kafkauser_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type KafkaUserSpec struct {
3737

3838
type PKIBackendSpec struct {
3939
IssuerRef *cmmeta.ObjectReference `json:"issuerRef,omitempty"`
40-
// +kubebuilder:validation:Enum={"cert-manager","vault","k8s-csr"}
40+
// +kubebuilder:validation:Enum={"cert-manager","k8s-csr"}
4141
PKIBackend string `json:"pkiBackend"`
4242
// SignerName indicates requested signer, and is a qualified name.
4343
SignerName string `json:"signerName,omitempty"`

‎api/v1beta1/common_types.go

-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ func (r SecurityProtocol) Equal(s SecurityProtocol) bool {
115115
const (
116116
// PKIBackendCertManager invokes cert-manager for user certificate management
117117
PKIBackendCertManager PKIBackend = "cert-manager"
118-
// PKIBackendVault invokes vault PKI for user certificate management
119-
PKIBackendVault PKIBackend = "vault"
120118
// PKIBackendProvided used to point the operator to use the PKI set in the cluster CR
121119
// for admin and users required for the cluster to run
122120
PKIBackendProvided PKIBackend = "pki-backend-provided"

‎api/v1beta1/kafkacluster_types.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ type KafkaClusterSpec struct {
7070
CruiseControlConfig CruiseControlConfig `json:"cruiseControlConfig"`
7171
EnvoyConfig EnvoyConfig `json:"envoyConfig,omitempty"`
7272
MonitoringConfig MonitoringConfig `json:"monitoringConfig,omitempty"`
73-
VaultConfig VaultConfig `json:"vaultConfig,omitempty"`
7473
AlertManagerConfig *AlertManagerConfig `json:"alertManagerConfig,omitempty"`
7574
IstioIngressConfig IstioIngressConfig `json:"istioIngressConfig,omitempty"`
7675
// Envs defines environment variables for Kafka broker Pods.
@@ -338,7 +337,7 @@ type SSLSecrets struct {
338337
JKSPasswordName string `json:"jksPasswordName"`
339338
Create bool `json:"create,omitempty"`
340339
IssuerRef *cmmeta.ObjectReference `json:"issuerRef,omitempty"`
341-
// +kubebuilder:validation:Enum={"cert-manager","vault"}
340+
// +kubebuilder:validation:Enum={"cert-manager"}
342341
PKIBackend PKIBackend `json:"pkiBackend,omitempty"`
343342
}
344343

@@ -347,14 +346,6 @@ type SSLSecrets struct {
347346
// E.g. TLSSecretName and JKSPasswordName are only required if Create is false
348347
// Or heck, do we even want to bother supporting an imported PKI?
349348

350-
// VaultConfig defines the configuration for a vault PKI backend
351-
type VaultConfig struct {
352-
AuthRole string `json:"authRole"`
353-
PKIPath string `json:"pkiPath"`
354-
IssuePath string `json:"issuePath"`
355-
UserStore string `json:"userStore"`
356-
}
357-
358349
// AlertManagerConfig defines configuration for alert manager
359350
type AlertManagerConfig struct {
360351
// DownScaleLimit the limit for auto-downscaling the Kafka cluster.

‎api/v1beta1/zz_generated.deepcopy.go

-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎charts/kafka-operator/templates/crds.yaml

-20
Original file line numberDiff line numberDiff line change
@@ -17798,7 +17798,6 @@ spec:
1779817798
the PKIManager
1779917799
enum:
1780017800
- cert-manager
17801-
- vault
1780217801
type: string
1780317802
tlsSecretName:
1780417803
type: string
@@ -17851,24 +17850,6 @@ spec:
1785117850
required:
1785217851
- failureThreshold
1785317852
type: object
17854-
vaultConfig:
17855-
description: VaultConfig defines the configuration for a vault PKI
17856-
backend
17857-
properties:
17858-
authRole:
17859-
type: string
17860-
issuePath:
17861-
type: string
17862-
pkiPath:
17863-
type: string
17864-
userStore:
17865-
type: string
17866-
required:
17867-
- authRole
17868-
- issuePath
17869-
- pkiPath
17870-
- userStore
17871-
type: object
1787217853
zkAddresses:
1787317854
description: ZKAddresses specifies the ZooKeeper connection string
1787417855
in the form hostname:port where host and port are the host and port
@@ -18228,7 +18209,6 @@ spec:
1822818209
pkiBackend:
1822918210
enum:
1823018211
- cert-manager
18231-
- vault
1823218212
- k8s-csr
1823318213
type: string
1823418214
signerName:

‎charts/kafka-operator/templates/operator-deployment-with-webhook.yaml

-18
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,6 @@ spec:
122122
secret:
123123
secretName: {{ .Values.webhook.certs.secret }}
124124
{{- end }}
125-
{{- if .Values.operator.vaultSecret }}
126-
- name: {{ .Values.operator.vaultSecret }}
127-
secret:
128-
secretName: {{ .Values.operator.vaultSecret }}
129-
{{- end }}
130125
{{- if .Values.additionalVolumes }}
131126
{{- include "chart.additionalVolumes" . | nindent 8 }}
132127
{{- end }}
@@ -186,14 +181,6 @@ spec:
186181
{{- if .Values.additionalEnv }}
187182
{{ toYaml .Values.additionalEnv | nindent 12 }}
188183
{{- end }}
189-
{{- if .Values.operator.vaultAddress }}
190-
- name: VAULT_ADDR
191-
value: {{ .Values.operator.vaultAddress }}
192-
{{- end }}
193-
{{- if .Values.operator.vaultSecret }}
194-
- name: VAULT_CACERT
195-
value: /etc/vault/certs/ca.crt
196-
{{- end }}
197184
ports:
198185
{{- if .Values.webhook.enabled }}
199186
- containerPort: {{ .Values.webhook.serverPort | default 443 }}
@@ -212,11 +199,6 @@ spec:
212199
name: serving-cert
213200
readOnly: true
214201
{{- end }}
215-
{{- if .Values.operator.vaultSecret }}
216-
- mountPath: /etc/vault/certs
217-
name: {{ .Values.operator.vaultSecret }}
218-
readOnly: true
219-
{{- end }}
220202
resources:
221203
{{ toYaml .Values.operator.resources | nindent 12 }}
222204
{{- if .Values.additionalSidecars }}

‎charts/kafka-operator/values.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ operator:
1414
repository: ghcr.io/banzaicloud/kafka-operator
1515
tag: ""
1616
pullPolicy: IfNotPresent
17-
vaultAddress: ""
18-
# vaultSecret containing a `ca.crt` key with the Vault CA Certificate
19-
vaultSecret: ""
20-
# set of namespaces where the operator watches resources
2117
namespaces: ""
2218
verboseLogging: false
2319
developmentLogging: false

‎config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml

-19
Original file line numberDiff line numberDiff line change
@@ -17797,7 +17797,6 @@ spec:
1779717797
the PKIManager
1779817798
enum:
1779917799
- cert-manager
17800-
- vault
1780117800
type: string
1780217801
tlsSecretName:
1780317802
type: string
@@ -17850,24 +17849,6 @@ spec:
1785017849
required:
1785117850
- failureThreshold
1785217851
type: object
17853-
vaultConfig:
17854-
description: VaultConfig defines the configuration for a vault PKI
17855-
backend
17856-
properties:
17857-
authRole:
17858-
type: string
17859-
issuePath:
17860-
type: string
17861-
pkiPath:
17862-
type: string
17863-
userStore:
17864-
type: string
17865-
required:
17866-
- authRole
17867-
- issuePath
17868-
- pkiPath
17869-
- userStore
17870-
type: object
1787117852
zkAddresses:
1787217853
description: ZKAddresses specifies the ZooKeeper connection string
1787317854
in the form hostname:port where host and port are the host and port

‎config/base/crds/kafka.banzaicloud.io_kafkausers.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ spec:
8282
pkiBackend:
8383
enum:
8484
- cert-manager
85-
- vault
8685
- k8s-csr
8786
type: string
8887
signerName:

0 commit comments

Comments
 (0)
Please sign in to comment.