Repository navigation
Reimplement component #16
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
Open
vshntea
wants to merge
1
commit into
projectsyn:main
Choose a base branch
from
vshntea:reimplement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Autorelease | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - synchronize | ||
| - labeled | ||
| - unlabeled | ||
| - closed | ||
|
|
||
| permissions: | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
| actions: write | ||
|
|
||
| jobs: | ||
| create-release-tag: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Create new tag | ||
| uses: projectsyn/pr-label-tag-action@v1 | ||
| with: | ||
| trigger: | | ||
| Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,16 @@ | ||
| _archive/ | ||
| _public/ | ||
| .cache/ | ||
| helmcharts/ | ||
| manifests/ | ||
| vendor/ | ||
| jsonnetfile.lock.json | ||
| build | ||
| # Commodore | ||
| /.cache | ||
| /dependencies | ||
| helmcharts | ||
| /manifests | ||
| /vendor | ||
| /jsonnetfile.lock.json | ||
| /crds | ||
| /compiled | ||
|
|
||
| # Antora | ||
| /_archive | ||
| /_public | ||
|
|
||
| # Additional entries | ||
| /.idea/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Configure instance alias for commodore component compile | ||
| commodore_args += --alias $(instance) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # The component name is hard-coded from the template | ||
| COMPONENT_NAME ?= helm-chart | ||
|
|
||
| git_dir ?= $(shell git rev-parse --git-common-dir) | ||
| compiled_path ?= compiled/$(COMPONENT_NAME)/$(COMPONENT_NAME) | ||
| root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)" | ||
| compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)" | ||
| commodore_args ?= --search-paths . -n $(COMPONENT_NAME) | ||
|
|
||
| ifneq "$(git_dir)" ".git" | ||
| git_volume ?= -v "$(git_dir):$(git_dir):ro" | ||
| antora_git_volume ?= -v "$(git_dir):/preview/antora/.git:ro" | ||
| else | ||
| git_volume ?= | ||
| antora_git_volume ?= -v "${PWD}/.git:/preview/antora/.git:ro" | ||
| endif | ||
|
|
||
| ifneq "$(shell which docker 2>/dev/null)" "" | ||
| DOCKER_CMD ?= $(shell which docker) | ||
| DOCKER_USERNS ?= "" | ||
| else | ||
| DOCKER_CMD ?= podman | ||
| DOCKER_USERNS ?= keep-id | ||
| endif | ||
| DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)" | ||
|
|
||
| JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \)) | ||
| JSONNETFMT_ARGS ?= --in-place --pad-arrays | ||
| JSONNET_IMAGE ?= ghcr.io/projectsyn/jsonnet:latest | ||
| JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=jsonnetfmt $(JSONNET_IMAGE) | ||
|
|
||
| YAMLLINT_ARGS ?= --no-warnings | ||
| YAMLLINT_CONFIG ?= .yamllint.yml | ||
| YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest | ||
| YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) $(YAMLLINT_IMAGE) | ||
|
|
||
| VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages ghcr.io/vshn/vale:2.15.5 | ||
| VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages | ||
|
|
||
| ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 $(antora_git_volume) --volume "${PWD}/docs":/preview/antora/docs ghcr.io/vshn/antora-preview:3.1.2.3 --style=syn --antora=docs | ||
|
|
||
| COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(git_volume) $(root_volume) docker.io/projectsyn/commodore:latest | ||
| COMPILE_CMD ?= $(COMMODORE_CMD) component compile . $(commodore_args) | ||
| JB_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install | ||
| GOLDEN_FILES ?= $(shell find tests/golden/$(instance) -type f) | ||
|
|
||
| KUBENT_FILES ?= $(shell echo "$(GOLDEN_FILES)" | sed 's/ /,/g') | ||
| KUBENT_ARGS ?= -c=false --helm3=false -e | ||
| KUBENT_IMAGE ?= ghcr.io/doitintl/kube-no-trouble:latest | ||
| KUBENT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=/app/kubent $(KUBENT_IMAGE) | ||
|
|
||
| instance ?= defaults | ||
| test_instances = tests/defaults.yml tests/with_values.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,38 @@ | ||
| # Commodore Component: helm-chart | ||
|
|
||
| This is a [Commodore][commodore] Component for helm charts. | ||
| This is a [Commodore][commodore] Component for helm-chart. | ||
|
|
||
| This repository is part of Project Syn. | ||
| For documentation on Project Syn and this component, see https://syn.tools. | ||
| This can be used to deploy a helm chart to the cluster. | ||
| The component is multi-tenant, multi-instance and multi-version aware: each | ||
| instance gets its own namespace and can pin its own chart version. | ||
|
|
||
| By default the component installs the OCI chart `test-helm-chart` from | ||
| `oci://ghcr.io/appuio/test-helm-chart/test-helm-chart`. | ||
|
|
||
| ## Documentation | ||
|
|
||
| Documentation for this component is written using [Asciidoc][asciidoc] and [Antora][antora]. | ||
| It is located in the [docs/](docs) folder. | ||
| The [Divio documentation structure](https://documentation.divio.com/) is used to organize its content. | ||
| It can be found in the [`docs`](docs) folder. | ||
| We use the [Divio documentation structure](https://documentation.divio.com/) to organize our documentation. | ||
|
|
||
| Run the `make docs-serve` command in the root of the project, and then browse to http://localhost:2020 to see a preview of the current state of the documentation. | ||
|
|
||
| After writing the documentation, please use the `make docs-vale` command and correct any warnings raised by the tool. | ||
|
|
||
| ## Testing | ||
|
|
||
| The component is tested with two instances, `defaults` and `with_values`: | ||
|
|
||
| - `make test -e instance=defaults` | ||
| - `make test -e instance=with_values` | ||
|
|
||
| Run `make gen-golden-all` to regenerate the golden test outputs. | ||
|
|
||
| ## Contributing and license | ||
|
|
||
| This library is licensed under [BSD-3-Clause](LICENSE). | ||
| For information about how to contribute see [CONTRIBUTING](CONTRIBUTING.md). | ||
| For information about how to contribute, see [CONTRIBUTING](CONTRIBUTING.md). | ||
|
|
||
| [commodore]: https://docs.syn.tools/commodore/index.html | ||
| [commodore]: https://syn.tools/commodore/ | ||
| [asciidoc]: https://asciidoctor.org/ | ||
| [antora]: https://antora.org/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.