-
Notifications
You must be signed in to change notification settings - Fork 83
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
tls: Check for certs to mark tls as unmanaged (PROJQUAY-2428) #518
Conversation
jonathankingfc
commented
Sep 9, 2021
•
edited
Loading
edited
- TLS should determined to be unmanaged by the presence of tls cert and key, not on any particular field
- Fields from the config.yaml are no longer used to determine this
c52fa84
to
8fb62ef
Compare
updatedQuay.Status.Conditions = v1.RemoveCondition(updatedQuay.Status.Conditions, v1.ConditionTypeRolloutBlocked) | ||
|
||
for _, component := range updatedQuay.Spec.Components { | ||
contains, err := kustomize.ContainsComponentConfig(userProvidedConfig, component) | ||
contains, err := kustomize.ContainsComponentConfig(userProvidedConfig, userProvidedCerts, component) |
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.
We could pass in configBundle.Data
directly, no?
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.
Not unless we alter how it is called elsewhere as well, since the call to this function in configure.go takes a different shape as configBundle.Data.
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 don't follow, configBundle.Data
is of type map[string][]byte
. userProvidedCerts
is also a map[string][]byte
.
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.
We can do this, but we will then have to combine reconfigureRequest.Certs and reconfigureRequest.Config into a single map in configure.go
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 don't follow, sorry. This makes no sense to me. The code "copies" data from A (configBundle.Data
) to B (userProvidedCerts
) if data is present in A, at last it then passes B to the function instead of just passing A and avoid the "copy" all together. Why can't we pass A directly here? As far as I understand nothing needs to be changed in configure.go.
8fb62ef
to
c642a59
Compare
updatedQuay.Status.Conditions = v1.RemoveCondition(updatedQuay.Status.Conditions, v1.ConditionTypeRolloutBlocked) | ||
|
||
for _, component := range updatedQuay.Spec.Components { | ||
contains, err := kustomize.ContainsComponentConfig(userProvidedConfig, component) | ||
contains, err := kustomize.ContainsComponentConfig(userProvidedConfig, userProvidedCerts, component) |
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 don't follow, sorry. This makes no sense to me. The code "copies" data from A (configBundle.Data
) to B (userProvidedCerts
) if data is present in A, at last it then passes B to the function instead of just passing A and avoid the "copy" all together. Why can't we pass A directly here? As far as I understand nothing needs to be changed in configure.go.
- TLS is determined to be unmanaged by the presence of tls cert and key - Fields from the config.yaml are no longer used to determine this
88a6180
to
f05fad1
Compare