Skip to content
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

Add support for specifying additional subject alternative names for apiserver #1599

Merged
merged 6 commits into from
Oct 29, 2021

Conversation

ahmedwaleedmalik
Copy link
Member

What this PR does / why we need it:
Add support for specifying additional subject alternative names for apiserver

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1464

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Option to specify `Subejct Alternative Names` for apiserver

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 28, 2021
pkg/templates/util.go Outdated Show resolved Hide resolved
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubermatic-bot kubermatic-bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 28, 2021
@kron4eg
Copy link
Member

kron4eg commented Oct 28, 2021

/hold

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2021
@kron4eg
Copy link
Member

kron4eg commented Oct 28, 2021

@ahmedwaleedmalik sorry, there is one more place (which I've forgot about) where this needs to be integrated. It's parsing from terraform.
We parse APIEndpoint from terraform

cluster.APIEndpoint = kubeonev1beta1.APIEndpoint{
so by analogy, please add parsing of additional_names (which you should define in terraform's output.tf).

@kron4eg
Copy link
Member

kron4eg commented Oct 28, 2021

/approve cancel
/lgtm cancel

@kubermatic-bot kubermatic-bot removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 28, 2021
@kron4eg
Copy link
Member

kron4eg commented Oct 28, 2021

/unhold

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2021
@ahmedwaleedmalik
Copy link
Member Author

additional_names

@kron4eg Please check my last commit. I have added something based on my understanding but it's not the right approach imo. Also, the value of SAN is not persisted anywhere in terraform state so this will cause a conflict between what's inputted via tf and KubeOneCluster config.

@kron4eg
Copy link
Member

kron4eg commented Oct 29, 2021

additional_names

it's not the right approach imo.

What’s the right approach in your opinion?

Also, the value of SAN is not persisted anywhere in terraform state

terraform outputs are saved, AFAIK

so this will cause a conflict between what's inputted via tf and KubeOneCluster config.

there’s no conflict but only a precedence. Config will override whatever is given from terraform.

@ahmedwaleedmalik
Copy link
Member Author

ahmedwaleedmalik commented Oct 29, 2021

Config will override whatever is given from terraform.

This clears my confusion. ✌️

@kubermatic-bot kubermatic-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2021
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 58ac66c156f4062e2c7b364d26cef331728349e8

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmedwaleedmalik, kron4eg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2021
@kubermatic-bot kubermatic-bot merged commit 5c60ffb into master Oct 29, 2021
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.4 milestone Oct 29, 2021
@kubermatic-bot kubermatic-bot deleted the add-alternative-names-support branch October 29, 2021 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to specify multiple subject alternative names (cert SANs)
3 participants