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

Updating docs and scripts to use kustomize overlay by default #574

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

mnaghavi
Copy link
Contributor

The structure of service deployment changed in a way that we can deploy all the services using overlay wether there is a change/patch in overlay or not to keep an standard of deployment across all the services.

Related PRs:
#564 (creating kustomize base and overlay structure)
https://github.com/rackerlabs/flex-host-baseline/pull/31/files (includes patches needed for the services in some envs)

@mnaghavi mnaghavi marked this pull request as ready for review November 19, 2024 19:37
@mnaghavi mnaghavi force-pushed the doc/use-overlay branch 2 times, most recently from 7a62890 to 792b4bf Compare November 19, 2024 20:39
Copy link
Contributor

@cloudnull cloudnull left a comment

Choose a reason for hiding this comment

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

Do you need to also rename all the "base" directories, to "overlay"?

@mnaghavi
Copy link
Contributor Author

Do you need to also rename all the "base" directories, to "overlay"?

I don't think we need to rename the base directories, in /etc/genestack/kustomize we do have the following stucture:

├── service-name
│   ├── base -> /opt/genestack/base-kustomize/service-name/base (symlink)
│   ├── aio -> /opt/genestack/base-kustomize/service-name/aio (symlink)
│   └── overlay
│       └── kustomization.yaml
│       └── service-patches.yaml

Also,vI've reviewed nearly all instances of base in the repo, and have converted all Kustomize-related base references to overlay where they relate to deployment. The only exceptions are those intended as examples in the documentation.
Please let me know if there is something missing here.

@mnaghavi mnaghavi requested a review from cloudnull November 20, 2024 19:06
@cloudnull
Copy link
Contributor

Do you need to also rename all the "base" directories, to "overlay"?

I don't think we need to rename the base directories, in /etc/genestack/kustomize we do have the following stucture:

├── service-name
│   ├── base -> /opt/genestack/base-kustomize/service-name/base (symlink)
│   ├── aio -> /opt/genestack/base-kustomize/service-name/aio (symlink)
│   └── overlay
│       └── kustomization.yaml
│       └── service-patches.yaml

Also,vI've reviewed nearly all instances of base in the repo, and have converted all Kustomize-related base references to overlay where they relate to deployment. The only exceptions are those intended as examples in the documentation. Please let me know if there is something missing here.

Currently there's no overlay directory in any of our kustomize folders, and nothing here looks to be creating it.
RE: https://github.com/rackerlabs/genestack/tree/main/base-kustomize/keystone - we have

├── keystone
│   ├── base (directory)
│   ├── aio (directory)

@mnaghavi
Copy link
Contributor Author

mnaghavi commented Nov 20, 2024

Currently there's no overlay directory in any of our kustomize folders, and nothing here looks to be creating it. RE: https://github.com/rackerlabs/genestack/tree/main/base-kustomize/keystone - we have

├── keystone
│   ├── base (directory)
│   ├── aio (directory)

@cloudnull Yeah, we didn't make any changes on /opt/genestack structure because we wanted to keep all the environment specific patches under /etc/genestack (which is a symlink to flex-host-baseline/env-name), so we used bootstrap.sh to create that structure for us under /etc/genestac/kustomize, here is the PR:
https://github.com/rackerlabs/genestack/pull/564/files#diff-99d5a2a8ca4290b61836b3ad37941f2b925e9ff3151c90dcd5ea82364e4122a1

@cloudnull
Copy link
Contributor

Currently there's no overlay directory in any of our kustomize folders, and nothing here looks to be creating it. RE: https://github.com/rackerlabs/genestack/tree/main/base-kustomize/keystone - we have

├── keystone
│   ├── base (directory)
│   ├── aio (directory)

@cloudnull Yeah, we didn't make any changes on /opt/genestack structure because we wanted to keep all the environment specific patches under /etc/genestack (which is a symlink to flex-host-baseline/env-name), so we used bootstrap.sh to create that structure for us under /etc/genestac/kustomize, here is the PR: https://github.com/rackerlabs/genestack/pull/564/files#diff-99d5a2a8ca4290b61836b3ad37941f2b925e9ff3151c90dcd5ea82364e4122a1

fair enough, I was looking at this from the lens of bases being deprecated in kustomize in favor of resources. https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#bases-and-overlays - but this makes more sense now. So +1

Copy link
Contributor

@the2hill the2hill left a comment

Choose a reason for hiding this comment

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

LGTM

@rackerchris rackerchris merged commit d4cac73 into rackerlabs:main Nov 21, 2024
2 checks passed
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.

4 participants