mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-30 10:18:57 +00:00
Compare commits
1 Commits
ingress-ap
...
build-repo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b6c855878 |
37
hack/build-repo.sh
Executable file
37
hack/build-repo.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
REPO_NAME="$(basename "$PWD")"
|
||||
OUT="../../_out/repos/$REPO_NAME"
|
||||
TMP="../../_out/repos/$REPO_NAME/historical"
|
||||
|
||||
if [ ! -f "versions_map" ]; then
|
||||
echo "Script should be called from packages/<repo>!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(set -x; rm -rf "$OUT")
|
||||
(set -x; mkdir -p "$OUT")
|
||||
|
||||
while read chart version commit; do
|
||||
if [ $commit = "HEAD" ]; then
|
||||
(set -x; helm package -d "$OUT" "$chart")
|
||||
continue
|
||||
fi
|
||||
mkdir -p "$TMP/$chart-$version"
|
||||
(set -x; git archive "$commit" "$chart" | tar -xf- --strip-components=1 -C "$TMP/$chart-$version")
|
||||
|
||||
if [ -d "$TMP/$chart-$version/charts" ]; then
|
||||
(set -x; find "$TMP/$chart-$version/charts" -type l -maxdepth 1 -mindepth 1) | awk -F/ '{print $NF}' | while read library_chart; do
|
||||
(set -x; rm -f "$TMP/$chart-$version/charts/$library_chart")
|
||||
(set -x; cd ../library && git archive "$commit" "$library_chart" | tar -xf- -C "$TMP/$chart-$version/charts/")
|
||||
done
|
||||
fi
|
||||
rm -rf "$tmp"
|
||||
done < versions_map
|
||||
|
||||
(set -x; helm package -d "$OUT" $(find . "$TMP" -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")' | sort -V))
|
||||
|
||||
(set -x; cd "$OUT" && helm repo index . --url "http://cozystack.cozy-system.svc/repos/$REPO_NAME")
|
||||
|
||||
(set -x; rm -rf "$TMP")
|
||||
@@ -1,14 +1,5 @@
|
||||
OUT=../../_out/repos/apps
|
||||
TMP=../../_out/repos/apps/historical
|
||||
|
||||
repo:
|
||||
rm -rf "$(OUT)"
|
||||
mkdir -p "$(OUT)"
|
||||
awk '$$3 != "HEAD" {print "mkdir -p $(TMP)/" $$1 "-" $$2}' versions_map | sh -ex
|
||||
awk '$$3 != "HEAD" {print "git archive " $$3 " " $$1 " | tar -xf- --strip-components=1 -C $(TMP)/" $$1 "-" $$2 }' versions_map | sh -ex
|
||||
helm package -d "$(OUT)" $$(find . $(TMP) -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")' | sort -V)
|
||||
cd "$(OUT)" && helm repo index . --url http://cozystack.cozy-system.svc/repos/apps
|
||||
rm -rf "$(TMP)"
|
||||
../../hack/build-repo.sh
|
||||
|
||||
fix-chartnames:
|
||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
OUT=../../_out/repos/extra
|
||||
TMP=../../_out/repos/extra/historical
|
||||
|
||||
repo:
|
||||
rm -rf "$(OUT)"
|
||||
mkdir -p "$(OUT)"
|
||||
awk '$$3 != "HEAD" {print "mkdir -p $(TMP)/" $$1 "-" $$2}' versions_map | sh -ex
|
||||
awk '$$3 != "HEAD" {print "git archive " $$3 " " $$1 " | tar -xf- --strip-components=1 -C $(TMP)/" $$1 "-" $$2 }' versions_map | sh -ex
|
||||
helm package -d "$(OUT)" $$(find . $(TMP) -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")' | sort -V)
|
||||
cd "$(OUT)" && helm repo index . --url http://cozystack.cozy-system.svc/repos/extra
|
||||
rm -rf "$(TMP)"
|
||||
../../hack/build-repo.sh
|
||||
|
||||
fix-chartnames:
|
||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done
|
||||
|
||||
@@ -3,4 +3,4 @@ name: ingress
|
||||
description: NGINX Ingress Controller
|
||||
icon: /logos/ingress-nginx.svg
|
||||
type: application
|
||||
version: 1.6.0
|
||||
version: 1.5.1
|
||||
|
||||
@@ -13,5 +13,4 @@
|
||||
| `dashboard` | Should ingress serve Cozystack service dashboard | `false` |
|
||||
| `cdiUploadProxy` | Should ingress serve CDI upload proxy | `false` |
|
||||
| `virtExportProxy` | Should ingress serve KubeVirt export proxy | `false` |
|
||||
| `api` | Should ingress serve Cozystack API | `true` |
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
|
||||
|
||||
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
|
||||
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
|
||||
|
||||
{{- if .Values.api }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
|
||||
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||
name: api-{{ .Release.Namespace }}
|
||||
namespace: default
|
||||
spec:
|
||||
ingressClassName: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- host: api.{{ $host }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: kubernetes
|
||||
port:
|
||||
number: 443
|
||||
path: /
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
@@ -10,7 +10,11 @@ kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
|
||||
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
{{- if eq $issuerType "cloudflare" }}
|
||||
{{- else }}
|
||||
acme.cert-manager.io/http01-ingress-class: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
name: cdi-uploadproxy-{{ .Release.Namespace }}
|
||||
namespace: cozy-kubevirt-cdi
|
||||
spec:
|
||||
@@ -26,4 +30,8 @@ spec:
|
||||
number: 443
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- cdi-uploadproxy.{{ $host }}
|
||||
secretName: cdi-uploadproxy-{{ .Release.Namespace }}-tls
|
||||
{{- end }}
|
||||
|
||||
@@ -40,11 +40,6 @@
|
||||
"type": "boolean",
|
||||
"description": "Should ingress serve KubeVirt export proxy",
|
||||
"default": false
|
||||
},
|
||||
"api": {
|
||||
"type": "boolean",
|
||||
"description": "Should ingress serve Cozystack API",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,3 @@ cdiUploadProxy: false
|
||||
|
||||
## @param virtExportProxy Should ingress serve KubeVirt export proxy
|
||||
virtExportProxy: false
|
||||
|
||||
## @param api Should ingress serve Cozystack API
|
||||
api: true
|
||||
|
||||
@@ -10,7 +10,11 @@ kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
|
||||
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
{{- if eq $issuerType "cloudflare" }}
|
||||
{{- else }}
|
||||
acme.cert-manager.io/http01-ingress-class: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
name: virt-exportproxy-{{ .Release.Namespace }}
|
||||
namespace: cozy-kubevirt
|
||||
spec:
|
||||
@@ -26,4 +30,8 @@ spec:
|
||||
number: 443
|
||||
path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls:
|
||||
- hosts:
|
||||
virt-exportproxy.{{ $host }}
|
||||
secretName: virt-exportproxy-{{ .Release.Namespace }}-tls
|
||||
{{- end }}
|
||||
@@ -19,7 +19,7 @@ ingress 1.2.0 28fca4ef
|
||||
ingress 1.3.0 fde4bcfa
|
||||
ingress 1.4.0 fd240701
|
||||
ingress 1.5.0 93bdf411
|
||||
ingress 1.6.0 HEAD
|
||||
ingress 1.5.1 HEAD
|
||||
monitoring 1.0.0 d7cfa53c
|
||||
monitoring 1.1.0 25221fdc
|
||||
monitoring 1.2.0 f81be075
|
||||
|
||||
Reference in New Issue
Block a user