Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Add the ability to generate a kustomization.yaml #239

Open
basvandenbrink opened this issue Aug 15, 2019 · 0 comments
Open

Add the ability to generate a kustomization.yaml #239

basvandenbrink opened this issue Aug 15, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@basvandenbrink
Copy link

As a:
Fabrikate user

I want:
To generate a kustomization.yaml per environment that includes all generated Kubernetes YAML as resources files for that enviroment.

So that:
I can use kubectl apply -k <environment_dir> to apply the resources to the cluster.

kubectl apply -k has support for ordering the Kubernetes resources. This would solve issues like #20.

Describe the solution you'd like:
Implement a -k or --kustomize option for fab generate. If this option is set, fabrikate will generate a kustomization.yaml file for every environment:

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# list of Resource Config to be Applied
resources:
- <component_a>.yaml
- <component_b>.yaml
- <component_c>.yaml

Describe alternatives you've considered:
Describing all namespaces as a static component. Then, when executing fab generate, a separate file will be created with the namespaces. Then, I could first do kubectl apply <namespaces_file>.yaml and then do kubectl apply .. However, this would only solve the namespace not ready problem. There could be other ordering problems that kustomize solve and that are not address by this alternative.

Additional context:

@basvandenbrink basvandenbrink added the enhancement New feature or request label Aug 15, 2019
@basvandenbrink basvandenbrink changed the title Add the possibility to generate a kustomization.yaml Add the ability to generate a kustomization.yaml Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant