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

Adjust machine sets to work on ocp 4.16 #483

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ spec:
- name: tag:Name
values:
- '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-worker-sg'
{{- $ocpversion := semver (fromClusterClaim "version.openshift.io") }}
{{- if gt $ocpversion.Minor 15 }}
Comment on lines +80 to +81
Copy link
Member

Choose a reason for hiding this comment

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

We have semverCompare available--maybe use it directly?

Suggested change
{{- $ocpversion := semver (fromClusterClaim "version.openshift.io") }}
{{- if gt $ocpversion.Minor 15 }}
{{- semverCompare ">4.15" (fromClusterClaim "version.openshift.io") }}

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw the semverCompare function, but I wasn't sure how it handled the patch release if you did a compare as described. I didn't play with it -- just went down the path that made sense at the moment. I'll test this some and see what happens.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, you're probably right. It probably should be ">=4.16"

Copy link
Member Author

Choose a reason for hiding this comment

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

When I use any of the comparisons with 4.16.0-rc.2 builds the comparisons just don't seem to work. While it works fine if I change the comparison to run against just "4.16.0", I think I am leaning towards keeping the existing code rather than switch to semverCompare which appears to have trouble with some OCP versioning - even if these are rc builds.

Copy link
Member

Choose a reason for hiding this comment

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

Works for me! And I guess the risk of bumping to OCP v5 is fairly low right now 🙂

- filters:
- name: tag:Name
values:
- '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-node'
- filters:
- name: tag:Name
values:
- '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-lb'
{{- end }}
subnet:
filters:
- name: tag:Name
Expand Down