Skip to content

Commit 0e9833c

Browse files
author
tomjo
committed
feat: support TLS authentication and customized volumes
1 parent 23de7c6 commit 0e9833c

File tree

6 files changed

+64
-5
lines changed

6 files changed

+64
-5
lines changed

charts/pulsar-resources-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ type: application
3030
# This is the chart version. This version number should be incremented each time you make changes
3131
# to the chart and its templates, including the app version.
3232
# Versions are expected to follow Semantic Versioning (https://semver.org/)
33-
version: v0.4.7
33+
version: v0.5.0
3434

3535
# This is the version number of the application being deployed. This version number should be
3636
# incremented each time you make changes to the application. Versions are not expected to
3737
# follow Semantic Versioning. They should reflect the version the application is using.
3838
# It is recommended to use it with quotes.
39-
appVersion: "v0.4.7"
39+
appVersion: "v0.5.0"
4040

4141
# This is a semver range of compatible Kubernetes versions. Helm will validate the version
4242
# constraints when installing the chart and fail if the cluster runs an unsupported Kubernetes version

charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarconnections.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ spec:
129129
- issuerEndpoint
130130
- key
131131
type: object
132+
tls:
133+
description: PulsarAuthenticationTLS indicates the parameters
134+
which are need by pulsar TLS Authentication
135+
properties:
136+
clientCertificateKeyPath:
137+
type: string
138+
clientCertificatePath:
139+
type: string
140+
required:
141+
- clientCertificateKeyPath
142+
- clientCertificatePath
143+
type: object
132144
token:
133145
description: ValueOrSecretRef is a string or a secret reference
134146
of the authentication
@@ -166,6 +178,16 @@ spec:
166178
description: ClusterName indicates the local cluster name of the pulsar
167179
cluster. It should set when enabling the Geo Replication
168180
type: string
181+
tlsEnableHostnameVerification:
182+
description: TLSEnableHostnameVerification indicates whether to verify the hostname of the broker.
183+
Only used when using secure urls.
184+
type: boolean
185+
tlsAllowInsecureConnection:
186+
description: TLSAllowInsecureConnection indicates whether to allow insecure connection to the broker.
187+
type: boolean
188+
tlsTrustCertsFilePath:
189+
description: TLSTrustCertsFilePath Path for the TLS certificate used to validate the broker endpoint when using TLS.
190+
type: string
169191
type: object
170192
status:
171193
description: PulsarConnectionStatus defines the observed state of PulsarConnection

charts/pulsar-resources-operator/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,18 @@ spec:
8686
periodSeconds: 20
8787
resources:
8888
{{- toYaml .Values.resources | nindent 10 }}
89+
{{- if .Values.extraVolumeMounts }}
90+
volumeMounts:
91+
{{- toYaml .Values.extraVolumeMounts | nindent 10 }}
92+
{{- end }}
8993
nodeSelector:
9094
{{- toYaml .Values.nodeSelector | nindent 8 }}
9195
affinity:
9296
{{- toYaml .Values.affinity | nindent 8 }}
9397
tolerations:
9498
{{- toYaml .Values.tolerations | nindent 8 }}
9599
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
100+
{{- if .Values.extraVolumes }}
101+
volumes:
102+
{{- toYaml .Values.extraVolumes | nindent 8 }}
103+
{{- end }}

charts/pulsar-resources-operator/tests/deployment_test.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tests:
3131
value: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.4
3232
- equal:
3333
path: spec.template.spec.containers[1].image
34-
value: docker.streamnative.io/streamnative/operators/pulsar-resources-operator:v0.4.7
34+
value: docker.streamnative.io/streamnative/operators/pulsar-resources-operator:v0.5.0
3535
- equal:
3636
path: spec.template.spec.containers[1].imagePullPolicy
3737
value: IfNotPresent
@@ -54,14 +54,18 @@ tests:
5454
path: spec.template.spec.containers[1].resources.requests
5555
- isNull:
5656
path: spec.template.spec.containers[1].resources.limits
57+
- isNull:
58+
path: spec.template.spec.containers[1].volumeMounts
59+
- isNull:
60+
path: spec.template.spec.volumes
5761

5862
- it: should update the image version successfully
5963
set:
60-
image.manager.tag: v0.4.7
64+
image.manager.tag: v0.5.0
6165
asserts:
6266
- equal:
6367
path: spec.template.spec.containers[1].image
64-
value: docker.streamnative.io/streamnative/operators/pulsar-resources-operator:v0.4.7
68+
value: docker.streamnative.io/streamnative/operators/pulsar-resources-operator:v0.5.0
6569

6670
- it: should update the replicas successfully
6771
set:

charts/pulsar-resources-operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ affinity: {}
116116

117117
# -- The period seconds that pod will be termiated gracefully
118118
terminationGracePeriodSeconds: 10
119+
120+
extraVolumeMounts: []
121+
extraVolumes: []

config/crd/bases/resource.streamnative.io_pulsarconnections.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ spec:
129129
- issuerEndpoint
130130
- key
131131
type: object
132+
tls:
133+
description: PulsarAuthenticationTLS indicates the parameters
134+
which are need by pulsar TLS Authentication
135+
properties:
136+
clientCertificateKeyPath:
137+
type: string
138+
clientCertificatePath:
139+
type: string
140+
required:
141+
- clientCertificateKeyPath
142+
- clientCertificatePath
143+
type: object
132144
token:
133145
description: ValueOrSecretRef is a string or a secret reference
134146
of the authentication
@@ -166,6 +178,16 @@ spec:
166178
description: ClusterName indicates the local cluster name of the pulsar
167179
cluster. It should set when enabling the Geo Replication
168180
type: string
181+
tlsEnableHostnameVerification:
182+
description: TLSEnableHostnameVerification indicates whether to verify the hostname of the broker.
183+
Only used when using secure urls.
184+
type: boolean
185+
tlsAllowInsecureConnection:
186+
description: TLSAllowInsecureConnection indicates whether to allow insecure connection to the broker.
187+
type: boolean
188+
tlsTrustCertsFilePath:
189+
description: TLSTrustCertsFilePath Path for the TLS certificate used to validate the broker endpoint when using TLS.
190+
type: string
169191
type: object
170192
status:
171193
description: PulsarConnectionStatus defines the observed state of PulsarConnection

0 commit comments

Comments
 (0)