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

[cert] Make sure DNSNames and IPAddresses are sorted #546

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Aug 5, 2024

To reduce possibility of changing certs, make sure lists of DNSNames and IPAddresses are sorted.

certificate: certificate,
timeout: timeout,
}

sort.Strings(crt.certificate.Spec.IPAddresses)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorting as strings will not order by IP address correctly. Could we parse the IPs and then sort (as byte slices I guess)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, let me fix that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated and added an ip sort func

To reduce possibility of changing certs, make sure lists of
DNSNames and IPAddresses are sorted.

Signed-off-by: Martin Schuppert <[email protected]>
Copy link
Contributor

@olliewalsh olliewalsh left a comment

Choose a reason for hiding this comment

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

/lgtm

@stuggi stuggi merged commit 1647f58 into openstack-k8s-operators:main Aug 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants