Skip to content

Commit 088245e

Browse files
authored
add TLS support for status service (ydb-platform#215)
1 parent 101ba44 commit 088245e

21 files changed

+686
-4
lines changed

api/v1alpha1/database_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,5 +268,6 @@ func init() {
268268
func (r *Database) AnyCertificatesAdded() bool {
269269
return len(r.Spec.CABundle) > 0 ||
270270
r.Spec.Service.GRPC.TLSConfiguration.Enabled ||
271-
r.Spec.Service.Interconnect.TLSConfiguration.Enabled
271+
r.Spec.Service.Interconnect.TLSConfiguration.Enabled ||
272+
r.Spec.Service.Status.TLSConfiguration.Enabled
272273
}

api/v1alpha1/database_webhook.go

+4
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ func (r *DatabaseDefaulter) Default(ctx context.Context, obj runtime.Object) err
106106
database.Spec.Service.Datastreams.TLSConfiguration = &TLSConfiguration{Enabled: false}
107107
}
108108

109+
if database.Spec.Service.Status.TLSConfiguration == nil {
110+
database.Spec.Service.Status.TLSConfiguration = &TLSConfiguration{Enabled: false}
111+
}
112+
109113
if database.Spec.Domain == "" {
110114
database.Spec.Domain = DefaultDatabaseDomain
111115
}

api/v1alpha1/service_types.go

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ type InterconnectService struct {
3232

3333
type StatusService struct {
3434
Service `json:""`
35+
36+
TLSConfiguration *TLSConfiguration `json:"tls,omitempty"`
3537
}
3638

3739
type DatastreamsService struct {

api/v1alpha1/storage_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -242,5 +242,6 @@ func init() {
242242
func (r *Storage) AnyCertificatesAdded() bool {
243243
return len(r.Spec.CABundle) > 0 ||
244244
r.Spec.Service.GRPC.TLSConfiguration.Enabled ||
245-
r.Spec.Service.Interconnect.TLSConfiguration.Enabled
245+
r.Spec.Service.Interconnect.TLSConfiguration.Enabled ||
246+
r.Spec.Service.Status.TLSConfiguration.Enabled
246247
}

api/v1alpha1/storage_webhook.go

+4
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func (r *StorageDefaulter) Default(ctx context.Context, obj runtime.Object) erro
156156
storage.Spec.Service.Interconnect.TLSConfiguration = &TLSConfiguration{Enabled: false}
157157
}
158158

159+
if storage.Spec.Service.Status.TLSConfiguration == nil {
160+
storage.Spec.Service.Status.TLSConfiguration = &TLSConfiguration{Enabled: false}
161+
}
162+
159163
if storage.Spec.Monitoring == nil {
160164
storage.Spec.Monitoring = &MonitoringOptions{
161165
Enabled: false,

api/v1alpha1/zz_generated.deepcopy.go

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

deploy/ydb-operator/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.5.13
18+
version: 0.5.14
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.5.13"
24+
appVersion: "0.5.14"

deploy/ydb-operator/crds/database.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -3994,6 +3994,70 @@ spec:
39943994
description: IPFamilyPolicy represents the dual-stack-ness
39953995
requested or required by a Service
39963996
type: string
3997+
tls:
3998+
properties:
3999+
CA:
4000+
description: SecretKeySelector selects a key of a Secret.
4001+
properties:
4002+
key:
4003+
description: The key of the secret to select from. Must
4004+
be a valid secret key.
4005+
type: string
4006+
name:
4007+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4008+
TODO: Add other useful fields. apiVersion, kind,
4009+
uid?'
4010+
type: string
4011+
optional:
4012+
description: Specify whether the Secret or its key
4013+
must be defined
4014+
type: boolean
4015+
required:
4016+
- key
4017+
type: object
4018+
certificate:
4019+
description: SecretKeySelector selects a key of a Secret.
4020+
properties:
4021+
key:
4022+
description: The key of the secret to select from. Must
4023+
be a valid secret key.
4024+
type: string
4025+
name:
4026+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4027+
TODO: Add other useful fields. apiVersion, kind,
4028+
uid?'
4029+
type: string
4030+
optional:
4031+
description: Specify whether the Secret or its key
4032+
must be defined
4033+
type: boolean
4034+
required:
4035+
- key
4036+
type: object
4037+
enabled:
4038+
type: boolean
4039+
key:
4040+
description: SecretKeySelector selects a key of a Secret.
4041+
properties:
4042+
key:
4043+
description: The key of the secret to select from. Must
4044+
be a valid secret key.
4045+
type: string
4046+
name:
4047+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4048+
TODO: Add other useful fields. apiVersion, kind,
4049+
uid?'
4050+
type: string
4051+
optional:
4052+
description: Specify whether the Secret or its key
4053+
must be defined
4054+
type: boolean
4055+
required:
4056+
- key
4057+
type: object
4058+
required:
4059+
- enabled
4060+
type: object
39974061
type: object
39984062
type: object
39994063
sharedResources:

deploy/ydb-operator/crds/databasenodeset.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,70 @@ spec:
26992699
description: IPFamilyPolicy represents the dual-stack-ness
27002700
requested or required by a Service
27012701
type: string
2702+
tls:
2703+
properties:
2704+
CA:
2705+
description: SecretKeySelector selects a key of a Secret.
2706+
properties:
2707+
key:
2708+
description: The key of the secret to select from. Must
2709+
be a valid secret key.
2710+
type: string
2711+
name:
2712+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2713+
TODO: Add other useful fields. apiVersion, kind,
2714+
uid?'
2715+
type: string
2716+
optional:
2717+
description: Specify whether the Secret or its key
2718+
must be defined
2719+
type: boolean
2720+
required:
2721+
- key
2722+
type: object
2723+
certificate:
2724+
description: SecretKeySelector selects a key of a Secret.
2725+
properties:
2726+
key:
2727+
description: The key of the secret to select from. Must
2728+
be a valid secret key.
2729+
type: string
2730+
name:
2731+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2732+
TODO: Add other useful fields. apiVersion, kind,
2733+
uid?'
2734+
type: string
2735+
optional:
2736+
description: Specify whether the Secret or its key
2737+
must be defined
2738+
type: boolean
2739+
required:
2740+
- key
2741+
type: object
2742+
enabled:
2743+
type: boolean
2744+
key:
2745+
description: SecretKeySelector selects a key of a Secret.
2746+
properties:
2747+
key:
2748+
description: The key of the secret to select from. Must
2749+
be a valid secret key.
2750+
type: string
2751+
name:
2752+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2753+
TODO: Add other useful fields. apiVersion, kind,
2754+
uid?'
2755+
type: string
2756+
optional:
2757+
description: Specify whether the Secret or its key
2758+
must be defined
2759+
type: boolean
2760+
required:
2761+
- key
2762+
type: object
2763+
required:
2764+
- enabled
2765+
type: object
27022766
type: object
27032767
type: object
27042768
sharedResources:

deploy/ydb-operator/crds/remotedatabasenodeset.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,70 @@ spec:
27002700
description: IPFamilyPolicy represents the dual-stack-ness
27012701
requested or required by a Service
27022702
type: string
2703+
tls:
2704+
properties:
2705+
CA:
2706+
description: SecretKeySelector selects a key of a Secret.
2707+
properties:
2708+
key:
2709+
description: The key of the secret to select from. Must
2710+
be a valid secret key.
2711+
type: string
2712+
name:
2713+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2714+
TODO: Add other useful fields. apiVersion, kind,
2715+
uid?'
2716+
type: string
2717+
optional:
2718+
description: Specify whether the Secret or its key
2719+
must be defined
2720+
type: boolean
2721+
required:
2722+
- key
2723+
type: object
2724+
certificate:
2725+
description: SecretKeySelector selects a key of a Secret.
2726+
properties:
2727+
key:
2728+
description: The key of the secret to select from. Must
2729+
be a valid secret key.
2730+
type: string
2731+
name:
2732+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2733+
TODO: Add other useful fields. apiVersion, kind,
2734+
uid?'
2735+
type: string
2736+
optional:
2737+
description: Specify whether the Secret or its key
2738+
must be defined
2739+
type: boolean
2740+
required:
2741+
- key
2742+
type: object
2743+
enabled:
2744+
type: boolean
2745+
key:
2746+
description: SecretKeySelector selects a key of a Secret.
2747+
properties:
2748+
key:
2749+
description: The key of the secret to select from. Must
2750+
be a valid secret key.
2751+
type: string
2752+
name:
2753+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2754+
TODO: Add other useful fields. apiVersion, kind,
2755+
uid?'
2756+
type: string
2757+
optional:
2758+
description: Specify whether the Secret or its key
2759+
must be defined
2760+
type: boolean
2761+
required:
2762+
- key
2763+
type: object
2764+
required:
2765+
- enabled
2766+
type: object
27032767
type: object
27042768
type: object
27052769
sharedResources:

deploy/ydb-operator/crds/remotestoragenodeset.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -2710,6 +2710,70 @@ spec:
27102710
description: IPFamilyPolicy represents the dual-stack-ness
27112711
requested or required by a Service
27122712
type: string
2713+
tls:
2714+
properties:
2715+
CA:
2716+
description: SecretKeySelector selects a key of a Secret.
2717+
properties:
2718+
key:
2719+
description: The key of the secret to select from. Must
2720+
be a valid secret key.
2721+
type: string
2722+
name:
2723+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2724+
TODO: Add other useful fields. apiVersion, kind,
2725+
uid?'
2726+
type: string
2727+
optional:
2728+
description: Specify whether the Secret or its key
2729+
must be defined
2730+
type: boolean
2731+
required:
2732+
- key
2733+
type: object
2734+
certificate:
2735+
description: SecretKeySelector selects a key of a Secret.
2736+
properties:
2737+
key:
2738+
description: The key of the secret to select from. Must
2739+
be a valid secret key.
2740+
type: string
2741+
name:
2742+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2743+
TODO: Add other useful fields. apiVersion, kind,
2744+
uid?'
2745+
type: string
2746+
optional:
2747+
description: Specify whether the Secret or its key
2748+
must be defined
2749+
type: boolean
2750+
required:
2751+
- key
2752+
type: object
2753+
enabled:
2754+
type: boolean
2755+
key:
2756+
description: SecretKeySelector selects a key of a Secret.
2757+
properties:
2758+
key:
2759+
description: The key of the secret to select from. Must
2760+
be a valid secret key.
2761+
type: string
2762+
name:
2763+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2764+
TODO: Add other useful fields. apiVersion, kind,
2765+
uid?'
2766+
type: string
2767+
optional:
2768+
description: Specify whether the Secret or its key
2769+
must be defined
2770+
type: boolean
2771+
required:
2772+
- key
2773+
type: object
2774+
required:
2775+
- enabled
2776+
type: object
27132777
type: object
27142778
type: object
27152779
storageRef:

0 commit comments

Comments
 (0)