Skip to content

Commit c866941

Browse files
committed
HOSTEDCP-1960: Add KubeAPIExteralName api
This new API changes the value of the Kubeconfig External URL to points to your desired one Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
1 parent 7c9455f commit c866941

38 files changed

+710
-11
lines changed

Diff for: api/hypershift/v1beta1/hosted_controlplane.go

+10
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ type HostedControlPlaneSpec struct {
115115
// +optional
116116
KubeConfig *KubeconfigSecretRef `json:"kubeconfig,omitempty"`
117117

118+
// kubeApiExternalName specifies the external name for the Kube API Server service.
119+
// +kubebuilder:validation:MaxLength=100
120+
// +kubebuilder:validation:MinLength=1
121+
// +optional
122+
KubeAPIExternalName string `json:"kubeApiExternalName,omitempty"`
123+
118124
// Services defines metadata about how control plane services are published
119125
// in the management cluster.
120126
// +kubebuilder:validation:MaxItems=6
@@ -300,6 +306,10 @@ type HostedControlPlaneStatus struct {
300306
// for this control plane.
301307
KubeConfig *KubeconfigSecretRef `json:"kubeConfig,omitempty"`
302308

309+
// KubeConfigExt is a reference to the secret containing the external kubeconfig
310+
// for this control plane.
311+
KubeConfigExt *KubeconfigSecretRef `json:"kubeConfigExt,omitempty"`
312+
303313
// KubeadminPassword is a reference to the secret containing the initial kubeadmin password
304314
// for the guest cluster.
305315
// +optional

Diff for: api/hypershift/v1beta1/hostedcluster_types.go

+10
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ type HostedClusterSpec struct {
432432
// +required
433433
Platform PlatformSpec `json:"platform"`
434434

435+
// kubeApiExternalName specifies the external name for the Kube API Server service.
436+
// +kubebuilder:validation:MaxLength=100
437+
// +kubebuilder:validation:MinLength=1
438+
// +optional
439+
KubeAPIExternalName string `json:"kubeApiExternalName,omitempty"`
440+
435441
// controllerAvailabilityPolicy specifies the availability policy applied to critical control plane components like the Kube API Server.
436442
// Possible values are HighlyAvailable and SingleReplica. The default value is HighlyAvailable.
437443
// +optional
@@ -1423,6 +1429,10 @@ type HostedClusterStatus struct {
14231429
// +optional
14241430
KubeConfig *corev1.LocalObjectReference `json:"kubeconfig,omitempty"`
14251431

1432+
// KubeConfigExt is a reference to the secret containing the external kubeconfig
1433+
// for this control plane.
1434+
KubeConfigExt *corev1.LocalObjectReference `json:"kubeconfigExt,omitempty"`
1435+
14261436
// KubeadminPassword is a reference to the secret that contains the initial
14271437
// kubeadmin user password for the guest cluster.
14281438
// +optional

Diff for: api/hypershift/v1beta1/zz_generated.deepcopy.go

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

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AAA_ungated.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,12 @@ spec:
23472347
rule: self == oldSelf
23482348
- message: issuerURL must be a valid absolute URL
23492349
rule: isURL(self)
2350+
kubeApiExternalName:
2351+
description: kubeApiExternalName specifies the external name for the
2352+
Kube API Server service.
2353+
maxLength: 100
2354+
minLength: 1
2355+
type: string
23502356
networking:
23512357
default:
23522358
clusterNetwork:
@@ -4207,6 +4213,22 @@ spec:
42074213
type: string
42084214
type: object
42094215
x-kubernetes-map-type: atomic
4216+
kubeconfigExt:
4217+
description: |-
4218+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4219+
for this control plane.
4220+
properties:
4221+
name:
4222+
default: ""
4223+
description: |-
4224+
Name of the referent.
4225+
This field is effectively required, but due to backwards compatibility is
4226+
allowed to be empty. Instances of this type with an empty value here are
4227+
almost certainly wrong.
4228+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4229+
type: string
4230+
type: object
4231+
x-kubernetes-map-type: atomic
42104232
oauthCallbackURLTemplate:
42114233
description: |-
42124234
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AROHCPManagedIdentities.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,12 @@ spec:
23432343
rule: self == oldSelf
23442344
- message: issuerURL must be a valid absolute URL
23452345
rule: isURL(self)
2346+
kubeApiExternalName:
2347+
description: kubeApiExternalName specifies the external name for the
2348+
Kube API Server service.
2349+
maxLength: 100
2350+
minLength: 1
2351+
type: string
23462352
networking:
23472353
default:
23482354
clusterNetwork:
@@ -4452,6 +4458,22 @@ spec:
44524458
type: string
44534459
type: object
44544460
x-kubernetes-map-type: atomic
4461+
kubeconfigExt:
4462+
description: |-
4463+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4464+
for this control plane.
4465+
properties:
4466+
name:
4467+
default: ""
4468+
description: |-
4469+
Name of the referent.
4470+
This field is effectively required, but due to backwards compatibility is
4471+
allowed to be empty. Instances of this type with an empty value here are
4472+
almost certainly wrong.
4473+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4474+
type: string
4475+
type: object
4476+
x-kubernetes-map-type: atomic
44554477
oauthCallbackURLTemplate:
44564478
description: |-
44574479
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AutoNodeKarpenter.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2388,6 +2388,12 @@ spec:
23882388
rule: self == oldSelf
23892389
- message: issuerURL must be a valid absolute URL
23902390
rule: isURL(self)
2391+
kubeApiExternalName:
2392+
description: kubeApiExternalName specifies the external name for the
2393+
Kube API Server service.
2394+
maxLength: 100
2395+
minLength: 1
2396+
type: string
23912397
networking:
23922398
default:
23932399
clusterNetwork:
@@ -4240,6 +4246,22 @@ spec:
42404246
type: string
42414247
type: object
42424248
x-kubernetes-map-type: atomic
4249+
kubeconfigExt:
4250+
description: |-
4251+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4252+
for this control plane.
4253+
properties:
4254+
name:
4255+
default: ""
4256+
description: |-
4257+
Name of the referent.
4258+
This field is effectively required, but due to backwards compatibility is
4259+
allowed to be empty. Instances of this type with an empty value here are
4260+
almost certainly wrong.
4261+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4262+
type: string
4263+
type: object
4264+
x-kubernetes-map-type: atomic
42434265
oauthCallbackURLTemplate:
42444266
description: |-
42454267
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/DynamicResourceAllocation.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2364,6 +2364,12 @@ spec:
23642364
rule: self == oldSelf
23652365
- message: issuerURL must be a valid absolute URL
23662366
rule: isURL(self)
2367+
kubeApiExternalName:
2368+
description: kubeApiExternalName specifies the external name for the
2369+
Kube API Server service.
2370+
maxLength: 100
2371+
minLength: 1
2372+
type: string
23672373
networking:
23682374
default:
23692375
clusterNetwork:
@@ -4216,6 +4222,22 @@ spec:
42164222
type: string
42174223
type: object
42184224
x-kubernetes-map-type: atomic
4225+
kubeconfigExt:
4226+
description: |-
4227+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4228+
for this control plane.
4229+
properties:
4230+
name:
4231+
default: ""
4232+
description: |-
4233+
Name of the referent.
4234+
This field is effectively required, but due to backwards compatibility is
4235+
allowed to be empty. Instances of this type with an empty value here are
4236+
almost certainly wrong.
4237+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4238+
type: string
4239+
type: object
4240+
x-kubernetes-map-type: atomic
42194241
oauthCallbackURLTemplate:
42204242
description: |-
42214243
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDC.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,12 @@ spec:
25852585
rule: self == oldSelf
25862586
- message: issuerURL must be a valid absolute URL
25872587
rule: isURL(self)
2588+
kubeApiExternalName:
2589+
description: kubeApiExternalName specifies the external name for the
2590+
Kube API Server service.
2591+
maxLength: 100
2592+
minLength: 1
2593+
type: string
25882594
networking:
25892595
default:
25902596
clusterNetwork:
@@ -4437,6 +4443,22 @@ spec:
44374443
type: string
44384444
type: object
44394445
x-kubernetes-map-type: atomic
4446+
kubeconfigExt:
4447+
description: |-
4448+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4449+
for this control plane.
4450+
properties:
4451+
name:
4452+
default: ""
4453+
description: |-
4454+
Name of the referent.
4455+
This field is effectively required, but due to backwards compatibility is
4456+
allowed to be empty. Instances of this type with an empty value here are
4457+
almost certainly wrong.
4458+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4459+
type: string
4460+
type: object
4461+
x-kubernetes-map-type: atomic
44404462
oauthCallbackURLTemplate:
44414463
description: |-
44424464
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HCPPodsLabels.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,12 @@ spec:
23432343
rule: self == oldSelf
23442344
- message: issuerURL must be a valid absolute URL
23452345
rule: isURL(self)
2346+
kubeApiExternalName:
2347+
description: kubeApiExternalName specifies the external name for the
2348+
Kube API Server service.
2349+
maxLength: 100
2350+
minLength: 1
2351+
type: string
23462352
labels:
23472353
additionalProperties:
23482354
type: string
@@ -4208,6 +4214,22 @@ spec:
42084214
type: string
42094215
type: object
42104216
x-kubernetes-map-type: atomic
4217+
kubeconfigExt:
4218+
description: |-
4219+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4220+
for this control plane.
4221+
properties:
4222+
name:
4223+
default: ""
4224+
description: |-
4225+
Name of the referent.
4226+
This field is effectively required, but due to backwards compatibility is
4227+
allowed to be empty. Instances of this type with an empty value here are
4228+
almost certainly wrong.
4229+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4230+
type: string
4231+
type: object
4232+
x-kubernetes-map-type: atomic
42114233
oauthCallbackURLTemplate:
42124234
description: |-
42134235
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/NetworkDiagnosticsConfig.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2495,6 +2495,12 @@ spec:
24952495
rule: self == oldSelf
24962496
- message: issuerURL must be a valid absolute URL
24972497
rule: isURL(self)
2498+
kubeApiExternalName:
2499+
description: kubeApiExternalName specifies the external name for the
2500+
Kube API Server service.
2501+
maxLength: 100
2502+
minLength: 1
2503+
type: string
24982504
networking:
24992505
default:
25002506
clusterNetwork:
@@ -4347,6 +4353,22 @@ spec:
43474353
type: string
43484354
type: object
43494355
x-kubernetes-map-type: atomic
4356+
kubeconfigExt:
4357+
description: |-
4358+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4359+
for this control plane.
4360+
properties:
4361+
name:
4362+
default: ""
4363+
description: |-
4364+
Name of the referent.
4365+
This field is effectively required, but due to backwards compatibility is
4366+
allowed to be empty. Instances of this type with an empty value here are
4367+
almost certainly wrong.
4368+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4369+
type: string
4370+
type: object
4371+
x-kubernetes-map-type: atomic
43504372
oauthCallbackURLTemplate:
43514373
description: |-
43524374
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/OpenStack.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,12 @@ spec:
23432343
rule: self == oldSelf
23442344
- message: issuerURL must be a valid absolute URL
23452345
rule: isURL(self)
2346+
kubeApiExternalName:
2347+
description: kubeApiExternalName specifies the external name for the
2348+
Kube API Server service.
2349+
maxLength: 100
2350+
minLength: 1
2351+
type: string
23462352
networking:
23472353
default:
23482354
clusterNetwork:
@@ -4683,6 +4689,22 @@ spec:
46834689
type: string
46844690
type: object
46854691
x-kubernetes-map-type: atomic
4692+
kubeconfigExt:
4693+
description: |-
4694+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4695+
for this control plane.
4696+
properties:
4697+
name:
4698+
default: ""
4699+
description: |-
4700+
Name of the referent.
4701+
This field is effectively required, but due to backwards compatibility is
4702+
allowed to be empty. Instances of this type with an empty value here are
4703+
almost certainly wrong.
4704+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4705+
type: string
4706+
type: object
4707+
x-kubernetes-map-type: atomic
46864708
oauthCallbackURLTemplate:
46874709
description: |-
46884710
OAuthCallbackURLTemplate contains a template for the URL to use as a callback

Diff for: api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AAA_ungated.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,12 @@ spec:
22452245
default value is kubernetes.default.svc, which only works for in-cluster
22462246
validation.
22472247
type: string
2248+
kubeApiExternalName:
2249+
description: kubeApiExternalName specifies the external name for the
2250+
Kube API Server service.
2251+
maxLength: 100
2252+
minLength: 1
2253+
type: string
22482254
kubeconfig:
22492255
description: KubeConfig specifies the name and key for the kubeconfig
22502256
secret
@@ -4029,6 +4035,19 @@ spec:
40294035
- key
40304036
- name
40314037
type: object
4038+
kubeConfigExt:
4039+
description: |-
4040+
KubeConfigExt is a reference to the secret containing the external kubeconfig
4041+
for this control plane.
4042+
properties:
4043+
key:
4044+
type: string
4045+
name:
4046+
type: string
4047+
required:
4048+
- key
4049+
- name
4050+
type: object
40324051
kubeadminPassword:
40334052
description: |-
40344053
KubeadminPassword is a reference to the secret containing the initial kubeadmin password

0 commit comments

Comments
 (0)