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

Kustomize: Correctly use resources instead of bases #14400

Closed
wants to merge 13 commits into from

Conversation

terencecho
Copy link
Contributor

@terencecho terencecho commented Jul 4, 2022

What

Kustomize was recently changes to use resources instead of the deprecated bases in this PR: #14037.

The acceptance tests have been broken because of this change. This PR is an attempt to fix that.
The error that shows up is:

Applying dev-integration-test manifests to kubernetes...
error: rawResources failed to read Resources: Load from path ../../resources failed: '../../resources' must be a file (got d='/actions-runner/_work/airbyte/airbyte/kube/resources')
Error: Process completed with exit code 1.

The fix will probably require changing the structure of the files to follow something like this: https://kubectl.docs.kubernetes.io/guides/config_management/components/.

@terencecho terencecho temporarily deployed to more-secrets July 4, 2022 19:30 Inactive
@terencecho terencecho marked this pull request as draft July 4, 2022 19:30
@github-actions github-actions bot added area/documentation Improvements or additions to documentation area/platform issues related to the platform kubernetes labels Jul 4, 2022
@terencecho
Copy link
Contributor Author

i think the problem is running into this issue:
kubernetes-sigs/kustomize#776 (comment)

@terencecho terencecho changed the title Change Kustomize bases to resources for acceptance tests @terencecho Revert "Kustomize: Use resources since bases is deprecated (#14037)" Jul 4, 2022
@terencecho terencecho changed the title @terencecho Revert "Kustomize: Use resources since bases is deprecated (#14037)" Revert "Kustomize: Use resources since bases is deprecated (#14037)" Jul 4, 2022
@terencecho
Copy link
Contributor Author

My hypothesis is that we're using Kustomize v2 which doesn't support resources as directories, instead of v3. Reverting seems to be the best course of action while we confirm that's the case and upgrade / figure out what the root cause of the failing acceptance tests are.

@terencecho
Copy link
Contributor Author

Looks like we're utilizing the latest kubectl which should have v4 of Kustomize as outlined here.

Also, from the official kubernetes documentation, they still use bases instead of resources: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#bases-and-overlays

@terencecho terencecho temporarily deployed to more-secrets July 4, 2022 21:22 Inactive
@terencecho terencecho changed the title Revert "Kustomize: Use resources since bases is deprecated (#14037)" Kustomize: Move base resources into same dir as overlays Jul 4, 2022
@terencecho terencecho temporarily deployed to more-secrets July 4, 2022 21:37 Inactive
@terencecho
Copy link
Contributor Author

todo: remove the moved resources and revert the forced acceptance test runs

@terencecho
Copy link
Contributor Author

terencecho commented Jul 4, 2022

The base resources need to be in the same parent dir as the overlays if we're using Resources instead of Bases.
Nvm, that doesn't fix the issue.

@github-actions github-actions bot removed the area/documentation Improvements or additions to documentation label Jul 4, 2022
@terencecho terencecho temporarily deployed to more-secrets July 4, 2022 22:26 Inactive
@terencecho terencecho temporarily deployed to more-secrets July 4, 2022 22:41 Inactive
@terencecho
Copy link
Contributor Author

we probably need to separate it out into components: https://kubectl.docs.kubernetes.io/guides/config_management/components/

@terencecho terencecho changed the title Kustomize: Move base resources into same dir as overlays Kustomize: Correctly use resources instead of bases Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants