-
Notifications
You must be signed in to change notification settings - Fork 15
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
Custom policies added to the CRD #126
Conversation
When the mounted secret is updated externally, the container can automatically see the changes. However, apicast has the policy already loaded and does not change behavior. When redeployed, updating the |
@@ -122,6 +122,15 @@ func (a *APIcastOptionsProvider) GetApicastOptions() (*APIcastOptions, error) { | |||
a.APIcastOptions.Workers = a.APIcastCR.Spec.Workers | |||
a.APIcastOptions.Timezone = a.APIcastCR.Spec.Timezone | |||
|
|||
for _, customPolicySpec := range a.APIcastCR.Spec.CustomPolicies { |
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 wondering whether we should validate each secret first, when processing the options?
In the case of HTTPsCertificate we check that it exists beforehand(see getHTTPSCertificateSecret
method). Maybe check that the specific required fields in the secret are there too?
What do you think?
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.
yes! additional check would be good
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.
implemented
251762d
to
a40caa3
Compare
4fcb404
to
f927735
Compare
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.
Looks good to me. Great work 👍
https://issues.redhat.com/browse/THREESCALE-7031
Custom policies exposed in the CRD:
Each policy is defined by:
All fields are mandatory.
Related liniks: