-
Notifications
You must be signed in to change notification settings - Fork 37
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
Deploy shoot-cert-service on garden runtime cluster #314
base: master
Are you sure you want to change the base?
Conversation
579ef96
to
55dec76
Compare
55dec76
to
b35170c
Compare
/assign |
b35170c
to
06c3ca4
Compare
06c3ca4
to
c11d626
Compare
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not qualified for an in-depth review but took a look at the things that I could understand based on the context anyway. Just a few suggestions and clarification questions.
if !strings.HasPrefix(s, "-----BEGIN CERTIFICATE-----") || !strings.HasSuffix(s, "-----END CERTIFICATE-----") { | ||
allErrs = append(allErrs, field.Invalid(fldPath.Child("certificate"), shorten(s), "invalid certificate, expected PEM format)")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same code is repeated below, and it could be extracted into a 🤏 helper function such as validateCertificates
.
Just as a thought: It'd be more thorough trying to decode the PEM content to validate or do you think that's too much for a quick validation?
Entry("Valid specification of CA", config.Configuration{ | ||
IssuerName: "gardener", | ||
CA: validCA, | ||
}, BeEmpty()), | ||
Entry("Invalid specification of both ACME and CA", config.Configuration{ | ||
IssuerName: "gardener", | ||
ACME: validACME, | ||
CA: validCA, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeInvalid), | ||
"Field": Equal("acme"), | ||
"Detail": Equal("only one of ACME or CA can be specified"), | ||
})), | ||
)), | ||
Entry("Invalid specification of none of ACME and CA", config.Configuration{ | ||
IssuerName: "gardener", | ||
ACME: nil, | ||
CA: nil, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeRequired), | ||
"Field": Equal("acme"), | ||
"Detail": Equal("at least one of ACME or CA must be specified"), | ||
})), | ||
)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I missed something the unhappy paths of validateCA
could be covered as well.
extensionscontroller.GetCluster = func(context.Context, client.Reader, string) (*extensions.Cluster, error) { | ||
return nil, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for me to understand the changes better: Why should extensionscontroller.GetCluster
always return nil
when running on the Garden Runtime cluster?
# TODO: This label approach is deprecated and no longer needed in the future. Remove them as soon as gardener/[email protected] has been released. | ||
networking.resources.gardener.cloud/from-policy-pod-label-selector: all-scrape-targets | ||
networking.resources.gardener.cloud/from-policy-allowed-ports: '[{"port":{{ .Values.configuration.serverPortHttp }},"protocol":"TCP"}]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Can we act on this TODO
since gardener/gardener
has just hit v1.110
? :)
replicaCount: 1 | ||
|
||
images: | ||
cert-management: any-repo:any-tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, just for me to understand: I assume the image value is overridden somewhere else?
How to categorize this PR?
/area control-plane
/kind enhancement
What this PR does / why we need it:
With the introduction of operation extensions, it is possible to deploy an extension on the Garden runtime cluster.
Adjustments both to the deployment of the shoot-cert-service itself and the deployment of the cert-management are needed to deal with the different environment on the Garden runtime cluster. In contrast to the deployment in the shoot namespace on the seed, deploy host and target are the same here. Moreover, some features like
shootIssuers
,dnsChallengeOnShoot
,alerting
are not relevant in this context. Prometheus scraping and Plutono dashboards are also not supported.Addtionally, the default issuer can now be a
CA
issuer instead aACME
issuer to support test and private cloud scenarios.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Part of gardener/gardener#9635
Release note: