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

Multi-manifest Support #1

Open
lander2k2 opened this issue Apr 12, 2023 · 1 comment
Open

Multi-manifest Support #1

lander2k2 opened this issue Apr 12, 2023 · 1 comment

Comments

@lander2k2
Copy link
Contributor

Currently the gener8s go command only supports a single manifest in a YAML document. This issue is to propose allowing multiple manifests which will produce multiple objects generated in output.

For example:

# +gener8s:var:sampleNamespace
apiVersion: v1
kind: Namespace
metadata:
  name: go-web3-sample-app
---
# +gener8s:var:sampleConfig
apiVersion: v1
kind: ConfigMap
metadata:
  name: go-web3-sample-app-config
  namespace: go-web3-sample-app
data:
  RPCENDPOINT: http://forward-proxy.forward-proxy-system.svc.cluster.local

Included here are markers that allow the variable name to be specified for each object. Order of priority would be:

  • object name supplied in marker
  • variable name supplied by -v flag (used for all objects without a marker)
  • default variable name: resourceObj

In the case that a var name is passed with -v flag and a marker is supplied, we can emit a warning that informs the user that the marker var name will be used.

@lander2k2
Copy link
Contributor Author

lander2k2 commented Apr 19, 2023

This will be divided into 2 steps:

  1. Implement multi-manifest support with generic variable names. The variable name should be different - appending an incrementing int will be sufficient.
  2. Move the markers package out of operator-builder into its own project, then import the new library and implement the variable name marker option. Issue: Move markers package to its own project and import it operator-builder#67

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

No branches or pull requests

1 participant