-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7b005cb
Showing
11 changed files
with
1,611 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
nix_direnv_watch_file flake.nix | ||
nix_direnv_watch_file flake.lock | ||
|
||
if ! use flake . --override-input devenv-root "file+file://"<(printf %s "$PWD") | ||
then | ||
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2 | ||
fi |
This file contains 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,39 @@ | ||
name: Build Contianers | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
concurrency: | ||
group: container | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: "write" | ||
contents: "read" | ||
packages: write | ||
|
||
steps: | ||
- uses: docker/metadata-action@v5 | ||
id: meta | ||
with: | ||
tags: | | ||
type=ref,event=branch | ||
type=semver,pattern=v{{major}} | ||
type=semver,pattern=v{{major}}.{{minor}} | ||
type=semver,pattern=v{{version}} | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- run: |- | ||
for tag in $(jq -r '.tags[]' <<< "$DOCKER_METADATA_OUTPUT_JSON"); do | ||
nix run .#container.copyTo --impure -- \ | ||
--dest-username ${{ github.actor}} \ | ||
--dest-password '${{ secrets.GITHUB_TOKEN }}' \ | ||
docker://ghcr.io/${{ github.repository }}:$tag | ||
done |
This file contains 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 @@ | ||
.devenv |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,39 @@ | ||
# krm-fn-kustomize | ||
|
||
[KRM](https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md) function | ||
to run [Kustomize](https://kustomize.io/). | ||
|
||
## Usage | ||
|
||
By default this function will build the Kustomization and output it to `build.yaml`. | ||
|
||
```shell | ||
kpt fn eval --image ghcr.io/jashandeep-sohi/krm-fn-kustomize | ||
``` | ||
|
||
You can override the kustomize command using the `cmd` option: | ||
|
||
```shell | ||
kpt fn eval --image ghcr.io/jashandeep-sohi/krm-fn-kustomize -- cmd='kustomize build --output test.yaml' | ||
``` | ||
|
||
Or declaratively: | ||
|
||
```yaml | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: example | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
pipeline: | ||
mutators: | ||
|
||
# This will build the Kustomization and output it to build.yaml | ||
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize | ||
|
||
# Override the command | ||
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize | ||
configMap: | ||
cmd: kustomize build --output test.yaml | ||
``` |
This file contains 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,16 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: example | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
pipeline: | ||
mutators: | ||
|
||
# This will build the Kustomization and output it to build.yaml | ||
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize | ||
|
||
# Override the command | ||
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize | ||
configMap: | ||
cmd: kustomize build --output test.yaml |
This file contains 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,4 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: deploy |
This file contains 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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./deploy.yaml | ||
namePrefix: prefix- | ||
namespace: change |
Oops, something went wrong.