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

Add backward compatibility checks for api changes #2114

Merged
merged 13 commits into from
Feb 5, 2022
Merged

Conversation

EngHabu
Copy link
Contributor

@EngHabu EngHabu commented Jan 31, 2022

As described here. The work done to move to the latest K8s APIs would break backward compatibility with older clusters. This PR adds compatibility check to use the corresponding K8s APIs

Signed-off-by: Haytham Abuelfutuh [email protected]

Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
@EngHabu EngHabu marked this pull request as ready for review February 4, 2022 19:49
wild-endeavor
wild-endeavor previously approved these changes Feb 4, 2022
Copy link
Contributor

@wild-endeavor wild-endeavor left a comment

Choose a reason for hiding this comment

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

have some questions though, i've been worried about this change for a while. how will this affect existing CRDs on a cluster?

@@ -24,7 +24,10 @@ jobs:
end-to-end-kustomize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Copy link
Contributor

Choose a reason for hiding this comment

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

why did we not need go before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is in my attempt to keep the environment consistent for make helm in CI and locally until we introduce a docker image to build helm template :-))))

@@ -21,4 +26,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
{{- else }}
version: v1alpha1
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be plural? or the one above singular?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the deprecated form.. you could only have one... the new api allows multiple versions declared in the CRD...

@@ -38,7 +39,7 @@ if [ -n "$DELTA_CHECK" ]; then
echo "diff detected: $DIFF"
DIFF=$(git diff --name-only)
echo "files different: $DIFF"
exit 1
exit 0
Copy link
Contributor

Choose a reason for hiding this comment

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

so always succeed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ops... nooo... that was me playing with the script... thanks for catching this!

Signed-off-by: Haytham Abuelfutuh <[email protected]>
@EngHabu EngHabu merged commit 695d352 into master Feb 5, 2022
@EngHabu EngHabu deleted the back-compat-api branch February 5, 2022 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants