-
Notifications
You must be signed in to change notification settings - Fork 567
CNTRLPLANE-216: Add KubeAPIExteralName api #5458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0aaa1e9
CNTRLPLANE-216: Add KubeAPIExteralName api
jparrill 749d776
CNTRLPLANE-216: Add autogenerated code and files
jparrill fa1ff15
CNTRLPLANE-216: Add E2E test for new API KubeAPIDNSName
jparrill f0b828b
NO-JIRA: Fix new gosimple minor issues in the code
jparrill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -471,6 +471,20 @@ type HostedClusterSpec struct { | |
| // +required | ||
| Platform PlatformSpec `json:"platform"` | ||
|
|
||
| // kubeAPIServerDNSName specifies a desired DNS name to resolve to the KAS. | ||
| // When set, the controller will automatically generate a secret with kubeconfig and expose it in the hostedCluster Status.customKubeconfig field. | ||
| // If it's set or removed day 2, the kubeconfig generated secret will be created, recreated or deleted. | ||
|
jparrill marked this conversation as resolved.
|
||
| // The DNS entries should be resolvable from the cluster, so this should be manually configured in the DNS provider. | ||
| // This field works in conjunction with configuration.APIServer.ServingCerts.NamedCertificates to enable | ||
| // access to the API server via a custom domain name. The NamedCertificates provide the TLS certificates | ||
|
jparrill marked this conversation as resolved.
|
||
| // for the custom domain, while this field triggers the generation of a kubeconfig that uses those certificates. | ||
| // This API endpoint only works in OCP version 4.19 or later. Older versions will result in a no-op. | ||
| // +kubebuilder:validation:XValidation:rule=`self == "" || self.matches('^(?:(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}|[a-zA-Z0-9-]+)$')`,message="kubeAPIServerDNSName must be a valid URL name (e.g., api.example.com)" | ||
| // +kubebuilder:validation:MaxLength=253 | ||
| // +kubebuilder:example: "api.example.com" | ||
| // +optional | ||
| KubeAPIServerDNSName string `json:"kubeAPIServerDNSName,omitempty"` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we foresee this config growing in future in a way that It would deserve having its own struct now so it can allocate more properties in future? |
||
|
|
||
| // controllerAvailabilityPolicy specifies the availability policy applied to critical control plane components like the Kube API Server. | ||
| // Possible values are HighlyAvailable and SingleReplica. The default value is HighlyAvailable. | ||
| // This field is immutable. | ||
|
|
@@ -1478,6 +1492,11 @@ type HostedClusterStatus struct { | |
| // +optional | ||
| KubeConfig *corev1.LocalObjectReference `json:"kubeconfig,omitempty"` | ||
|
|
||
| // CustomKubeconfig is a local secret reference to the external custom kubeconfig. | ||
| // Once the hypershift operator sets this status field, it will generate a secret with the specified name containing a kubeconfig within the `HostedCluster` namespace. | ||
| // +optional | ||
| CustomKubeconfig *corev1.LocalObjectReference `json:"customKubeconfig,omitempty"` | ||
|
|
||
| // KubeadminPassword is a reference to the secret that contains the initial | ||
| // kubeadmin user password for the guest cluster. | ||
| // +optional | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.