mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+kluctl.io -- Kluctl is the missing glue to put together large Kubernetes deployments (#3849)
* +kluctl.io -- Kluctl is the missing glue to put together large Kubernetes deployments * +kluctl.io -- add missing npm dependency
This commit is contained in:
parent
4171f6d6c1
commit
8360279400
5 changed files with 75 additions and 0 deletions
9
projects/kluctl.io/.kluctl.yml
Normal file
9
projects/kluctl.io/.kluctl.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
discriminator: kluctl-examples-simple-{{ target.name }}
|
||||
|
||||
targets:
|
||||
- name: simple
|
||||
args:
|
||||
environment: simple
|
||||
|
||||
args:
|
||||
- name: environment
|
6
projects/kluctl.io/deployment.yml
Normal file
6
projects/kluctl.io/deployment.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
deployments:
|
||||
- path: "."
|
||||
|
||||
commonLabels:
|
||||
examples.kluctl.io/environment: "{{ args.environment }}"
|
||||
examples.kluctl.io/deployment-project: k8s-deployment-simple
|
4
projects/kluctl.io/kustomization.yml
Normal file
4
projects/kluctl.io/kustomization.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- nginx.yml
|
21
projects/kluctl.io/nginx.yml
Normal file
21
projects/kluctl.io/nginx.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment-{{ args.environment }}
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.14.2
|
||||
ports:
|
||||
- containerPort: 80
|
35
projects/kluctl.io/package.yml
Normal file
35
projects/kluctl.io/package.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
distributable:
|
||||
url: https://github.com/kluctl/kluctl/archive/refs/tags/v{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: kluctl/kluctl
|
||||
strip: /^kluctl-v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.21
|
||||
nodejs.org: ^18
|
||||
npmjs.com: "*"
|
||||
gnu.org/make: "*"
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
LDFLAGS:
|
||||
- -extldflags=-static
|
||||
- -w
|
||||
- -s
|
||||
- -X=main.version=v{{version}}
|
||||
script: |
|
||||
make build-webui
|
||||
go build -v -ldflags="$LDFLAGS" -o bin/kluctl cmd/main.go
|
||||
mkdir -p "{{ prefix }}"/bin
|
||||
mv bin/kluctl "{{ prefix }}"/bin
|
||||
|
||||
provides:
|
||||
- bin/kluctl
|
||||
|
||||
test:
|
||||
script: |
|
||||
test "$(kluctl version)" = v{{version}}
|
||||
kluctl render --print-all --offline-kubernetes -t simple > simple.yml
|
||||
test -f simple.yml
|
Loading…
Reference in a new issue