Skip to content

Commit 7fed349

Browse files
stuggiolliewalsh
authored andcommitted
[tlse] rename TLSPodLevelConfig.Default to TLSPodLevelConfig.Internal
Jira: OSPRH-5342
1 parent 8b66dc5 commit 7fed349

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16189,12 +16189,12 @@ spec:
1618916189
duration: 8760h
1619016190
enabled: true
1619116191
podLevel:
16192-
default:
16192+
enabled: false
16193+
internal:
1619316194
ca:
1619416195
duration: 43800h
1619516196
cert:
1619616197
duration: 8760h
16197-
enabled: false
1619816198
ovn:
1619916199
ca:
1620016200
duration: 43800h
@@ -16224,7 +16224,9 @@ spec:
1622416224
type: object
1622516225
podLevel:
1622616226
properties:
16227-
default:
16227+
enabled:
16228+
type: boolean
16229+
internal:
1622816230
properties:
1622916231
ca:
1623016232
properties:
@@ -16241,8 +16243,6 @@ spec:
1624116243
type: string
1624216244
type: object
1624316245
type: object
16244-
enabled:
16245-
type: boolean
1624616246
ovn:
1624716247
properties:
1624816248
ca:

apis/core/v1beta1/openstackcontrolplane_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type OpenStackControlPlaneSpec struct {
7676

7777
// +kubebuilder:validation:Optional
7878
// +operator-sdk:csv:customresourcedefinitions:type=spec
79-
// +kubebuilder:default={ingress: {enabled: true, ca: {duration: "43800h"}, cert: {duration: "8760h"}}, podLevel: {enabled: false, default:{ca: {duration: "43800h"}, cert: {duration: "8760h"}}, ovn: {ca: {duration: "43800h"}, cert: {duration: "8760h"}}}}
79+
// +kubebuilder:default={ingress: {enabled: true, ca: {duration: "43800h"}, cert: {duration: "8760h"}}, podLevel: {enabled: false, internal:{ca: {duration: "43800h"}, cert: {duration: "8760h"}}, ovn: {ca: {duration: "43800h"}, cert: {duration: "8760h"}}}}
8080
// TLS - Parameters related to the TLS
8181
TLS TLSSection `json:"tls"`
8282

@@ -224,9 +224,9 @@ type TLSPodLevelConfig struct {
224224

225225
// +kubebuilder:validation:Optional
226226
// +operator-sdk:csv:customresourcedefinitions:type=spec
227-
// Default - CA used for all OpenStackControlPlane and OpenStackDataplane endpoints,
227+
// Internal - default CA used for all OpenStackControlPlane and OpenStackDataplane endpoints,
228228
// except OVN related CA and certs
229-
Default CertSection `json:"default,omitempty"`
229+
Internal CertSection `json:"internal,omitempty"`
230230

231231
// +kubebuilder:validation:Optional
232232
// +operator-sdk:csv:customresourcedefinitions:type=spec

apis/core/v1beta1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16189,12 +16189,12 @@ spec:
1618916189
duration: 8760h
1619016190
enabled: true
1619116191
podLevel:
16192-
default:
16192+
enabled: false
16193+
internal:
1619316194
ca:
1619416195
duration: 43800h
1619516196
cert:
1619616197
duration: 8760h
16197-
enabled: false
1619816198
ovn:
1619916199
ca:
1620016200
duration: 43800h
@@ -16224,7 +16224,9 @@ spec:
1622416224
type: object
1622516225
podLevel:
1622616226
properties:
16227-
default:
16227+
enabled:
16228+
type: boolean
16229+
internal:
1622816230
properties:
1622916231
ca:
1623016232
properties:
@@ -16241,8 +16243,6 @@ spec:
1624116243
type: string
1624216244
type: object
1624316245
type: object
16244-
enabled:
16245-
type: boolean
1624616246
ovn:
1624716247
properties:
1624816248
ca:

config/manifests/bases/openstack-operator.clusterserviceversion.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -407,21 +407,21 @@ spec:
407407
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
408408
- displayName: Pod Level
409409
path: tls.podLevel
410-
- description: Default - CA used for all OpenStackControlPlane and OpenStackDataplane
411-
endpoints, except OVN related CA and certs
412-
displayName: Default
413-
path: tls.podLevel.default
414-
- description: Ca - defines details for CA cert config
415-
displayName: Ca
416-
path: tls.podLevel.default.ca
417-
- description: Cert - defines details for cert config
418-
displayName: Cert
419-
path: tls.podLevel.default.cert
420410
- description: Enabled - Whether TLS should be enabled for endpoint type
421411
displayName: Enabled
422412
path: tls.podLevel.enabled
423413
x-descriptors:
424414
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
415+
- description: Internal - default CA used for all OpenStackControlPlane and
416+
OpenStackDataplane endpoints, except OVN related CA and certs
417+
displayName: Internal
418+
path: tls.podLevel.internal
419+
- description: Ca - defines details for CA cert config
420+
displayName: Ca
421+
path: tls.podLevel.internal.ca
422+
- description: Cert - defines details for cert config
423+
displayName: Cert
424+
path: tls.podLevel.internal.cert
425425
- description: Ovn - CA used for all OVN services on OpenStackControlPlane and
426426
OpenStackDataplane
427427
displayName: Ovn

pkg/openstack/ca.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func ReconcileCAs(ctx context.Context, instance *corev1.OpenStackControlPlane, h
122122
map[string]string{certmanager.RootCAIssuerInternalLabel: ""},
123123
bundle,
124124
caOnlyBundle,
125-
instance.Spec.TLS.PodLevel.Default.Ca,
125+
instance.Spec.TLS.PodLevel.Internal.Ca,
126126
)
127127
if err != nil {
128128
return ctrlResult, err

pkg/openstack/common.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ func EnsureEndpointConfig(
318318
Labels: ed.Labels,
319319
Usages: nil,
320320
}
321-
if instance.Spec.TLS.PodLevel.Default.Cert.Duration != nil {
322-
certRequest.Duration = &instance.Spec.TLS.PodLevel.Default.Cert.Duration.Duration
321+
if instance.Spec.TLS.PodLevel.Internal.Cert.Duration != nil {
322+
certRequest.Duration = &instance.Spec.TLS.PodLevel.Internal.Cert.Duration.Duration
323323
}
324-
if instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore != nil {
325-
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore.Duration
324+
if instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore != nil {
325+
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore.Duration
326326
}
327327
certSecret, ctrlResult, err := certmanager.EnsureCert(
328328
ctx,

pkg/openstack/galera.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ func ReconcileGaleras(
5858
"client auth",
5959
},
6060
}
61-
if instance.Spec.TLS.PodLevel.Default.Cert.Duration != nil {
62-
certRequest.Duration = &instance.Spec.TLS.PodLevel.Default.Cert.Duration.Duration
61+
if instance.Spec.TLS.PodLevel.Internal.Cert.Duration != nil {
62+
certRequest.Duration = &instance.Spec.TLS.PodLevel.Internal.Cert.Duration.Duration
6363
}
64-
if instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore != nil {
65-
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore.Duration
64+
if instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore != nil {
65+
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore.Duration
6666
}
6767
certSecret, ctrlResult, err := certmanager.EnsureCert(
6868
ctx,

pkg/openstack/rabbitmq.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ func reconcileRabbitMQ(
181181
CertName: fmt.Sprintf("%s-svc", rabbitmq.Name),
182182
Hostnames: []string{hostname},
183183
}
184-
if instance.Spec.TLS.PodLevel.Default.Cert.Duration != nil {
185-
certRequest.Duration = &instance.Spec.TLS.PodLevel.Default.Cert.Duration.Duration
184+
if instance.Spec.TLS.PodLevel.Internal.Cert.Duration != nil {
185+
certRequest.Duration = &instance.Spec.TLS.PodLevel.Internal.Cert.Duration.Duration
186186
}
187-
if instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore != nil {
188-
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Default.Cert.RenewBefore.Duration
187+
if instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore != nil {
188+
certRequest.RenewBefore = &instance.Spec.TLS.PodLevel.Internal.Cert.RenewBefore.Duration
189189
}
190190
certSecret, ctrlResult, err := certmanager.EnsureCert(
191191
ctx,

0 commit comments

Comments
 (0)