-
Notifications
You must be signed in to change notification settings - Fork 96
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
Move operator to gotohelm #1509
Conversation
2d415d6
to
c5a40a2
Compare
0e673f9
to
cf1477c
Compare
9dfd2f8
to
76dc85a
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.
No major blockers!
require.NoError(t, os.WriteFile("testdata/template-cases-generated.txtar", archive, 0o644)) | ||
} | ||
|
||
func makeSureTagIsNotEmptyString(values PartialValues, fuzzer *fuzz.Fuzzer) { |
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.
Should this check be enforced by the chart's JSON schema?
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.
It is exactly JSON schema that enforces me to re-generate any tag. That's why this function is created.
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.
Hmmm, shouldn't this block handle that for you in that case? Or do we never end up generating a valid values due to the number of fields here?
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.
It should handle that, but for me it was to much false positive. I didn't want to wait.
) | ||
} | ||
|
||
if overrides.Spec.TopologySpreadConstraints != nil && len(overrides.Spec.TopologySpreadConstraints) > 0 { |
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 think it was necessary to fully implement this when we just need to be able to override SecurityPolicy 😅
Did you try just calling merge
on the pod specs and then filling in fields that need special handling? I think I tried that for containers and it didn't work but I don't recall why....
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.
It was not reliable, that's why I copied from redpanda chart and filled all other fields.
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.
merge
wasn't reliable or the implementation in the redpanda chart wasn't reliable?
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
func ClusterRole(dot *helmette.Dot) []rbacv1.ClusterRole { |
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.
Note for the future (not this PR). We could add the ability to load files into gotohelm and just read these from disk so they don't get out of sync. Similar to what I did here: #1285
76dc85a
to
1b9bf71
Compare
Any array that has null assigned would fail the helm template with invalid schema.
31220b5
to
29a41e6
Compare
require.NoError(t, os.WriteFile("testdata/template-cases-generated.txtar", archive, 0o644)) | ||
} | ||
|
||
func makeSureTagIsNotEmptyString(values PartialValues, fuzzer *fuzz.Fuzzer) { |
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.
Hmmm, shouldn't this block handle that for you in that case? Or do we never end up generating a valid values due to the number of fields here?
) | ||
} | ||
|
||
if overrides.Spec.TopologySpreadConstraints != nil && len(overrides.Spec.TopologySpreadConstraints) > 0 { |
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.
merge
wasn't reliable or the implementation in the redpanda chart wasn't reliable?
29a41e6
to
82baddd
Compare
2034b23
to
927d09f
Compare
The helmignore is required if testdata consist of large generated "golden" files like in current operator chart. Helm cli would take that files and include in the release. Currently console 0.7.29 and connectors 0.1.12 have testdata directy included. With this commit they will omit go files and testdata.
927d09f
to
7f3b247
Compare
To solve problem of missing security context this commit moves almost all resources to go. genschema is currently broken as I tried to solve particular issue with operator schema generation. Need to fix before merging this PR.