Compare commits
No commits in common. "flows" and "main" have entirely different histories.
@ -1,60 +0,0 @@
|
|||||||
name: Helm Chart CI
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
branches-ignore:
|
|
||||||
- main
|
|
||||||
jobs:
|
|
||||||
package-and-register:
|
|
||||||
name: Package and Register Helm Chart
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Step 1: Checkout Repository
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Step 2: Check Helm Installation
|
|
||||||
- name: Check Helm Installation
|
|
||||||
id: helm_installed
|
|
||||||
run: |
|
|
||||||
if command -v helm >/dev/null 2>&1; then
|
|
||||||
echo "helm_installed=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "helm_installed=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Step 3: Install Helm
|
|
||||||
- name: Install Helm
|
|
||||||
if: steps.helm_installed.outputs.helm_installed == 'false'
|
|
||||||
run: |
|
|
||||||
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
|
||||||
chmod 700 get_helm.sh
|
|
||||||
./get_helm.sh
|
|
||||||
|
|
||||||
|
|
||||||
# Step 4: Validate Helm Chart
|
|
||||||
- name: Lint Helm Chart
|
|
||||||
run: |
|
|
||||||
helm lint ./ # Validate chart structure and syntax
|
|
||||||
|
|
||||||
# Step 5: Package Helm Chart with Updated Version
|
|
||||||
- name: Package Helm Chart
|
|
||||||
env:
|
|
||||||
COMMIT_SHA: ${{ github.sha }}
|
|
||||||
run: |
|
|
||||||
# Package the Helm chart
|
|
||||||
helm package ./ --destination ./packages
|
|
||||||
|
|
||||||
# Step 6: Push Helm Chart to Gitea
|
|
||||||
- name: Push Helm Chart to Gitea
|
|
||||||
env:
|
|
||||||
CI_USER: ${{ secrets.CI_USER }}
|
|
||||||
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
|
|
||||||
run: |
|
|
||||||
# Login to the registry
|
|
||||||
echo $CI_USER_TOKEN | helm registry login centurion-version-control.default.svc.cluster.local:3000 \
|
|
||||||
--username $CI_USER --password-stdin --insecure
|
|
||||||
|
|
||||||
# Push Helm chart to Gitea
|
|
||||||
helm push ./packages/*.tgz oci://centurion-version-control.default.svc.cluster.local:3000/centurion/helm --plain-http
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
name: flow-worker
|
|
||||||
description: A Helm chart for deploying a flow
|
|
||||||
type: application
|
|
||||||
version: 0.1.1
|
|
||||||
appVersion: 1.0.0
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-config
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
data:
|
|
||||||
{{- range .Values.environment.variables }}
|
|
||||||
{{ .name }}: {{ .value }}
|
|
||||||
{{- end }}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ .Values.replicaCount }}
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
image: "{{ .Values.imageRegistry.server }}/centurion/{{ .Values.name }}:{{ .Values.version }}"
|
|
||||||
insecure: true
|
|
||||||
imagePullPolicy: Always
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-config
|
|
||||||
- secretRef:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-secret
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-registry-secret
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: {{ .Values.resources.limits.cpu | quote }}
|
|
||||||
memory: {{ .Values.resources.limits.memory | quote }}
|
|
||||||
requests:
|
|
||||||
cpu: {{ .Values.resources.requests.cpu | quote }}
|
|
||||||
memory: {{ .Values.resources.requests.memory | quote }}
|
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /mnt/temporal-worker-data
|
|
||||||
name: worker-storage
|
|
||||||
{{- end }}
|
|
||||||
volumes:
|
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
- name: worker-storage
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.version }}-pvc
|
|
||||||
{{- end }}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-pvc
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
{{- range .Values.persistence.accessModes }}
|
|
||||||
- {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.size }}
|
|
||||||
{{- end }}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-registry-secret
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
type: kubernetes.io/dockerconfigjson
|
|
||||||
data:
|
|
||||||
.dockerconfigjson: >
|
|
||||||
{{ printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"dummy@example.com\"}}}" .Values.imageRegistry.server .Values.imageRegistry.username .Values.imageRegistry.password | b64enc }}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-secret
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
{{- range .Values.environment.secrets }}
|
|
||||||
{{ .name }}: {{ .value | b64enc }}
|
|
||||||
{{- end }}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
{{- if .Values.service.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}-service
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
labels:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: {{ .Values.repoName }}-{{ .Values.branchName }}-{{ .Values.shortVersion }}
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: {{ .Values.service.port }}
|
|
||||||
targetPort: 8080
|
|
||||||
type: {{ .Values.service.type }}
|
|
||||||
{{- end }}
|
|
||||||
36
values.yaml
36
values.yaml
@ -1,36 +0,0 @@
|
|||||||
namespace: default
|
|
||||||
name: "name"
|
|
||||||
repoName: "default-repo-name"
|
|
||||||
branchName: "default-branch"
|
|
||||||
version: "0.0.0"
|
|
||||||
shortVersion: "0.0.0"
|
|
||||||
replicaCount: 1
|
|
||||||
FLOWX_ENGINE_ADDRESS: "centurion-workflow-frontend.default.svc.cluster.local:7233"
|
|
||||||
imageRegistry:
|
|
||||||
server: "centurion-version-control.default.svc.cluster.local:3000"
|
|
||||||
username: "your-username"
|
|
||||||
password: "your-token" # Corrected missing closing quote here
|
|
||||||
|
|
||||||
environment:
|
|
||||||
secrets:
|
|
||||||
- name: "default-secret"
|
|
||||||
value: "default-value"
|
|
||||||
variables:
|
|
||||||
- name: "default-variable"
|
|
||||||
value: "default-value"
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: "100m"
|
|
||||||
memory: "128Mi"
|
|
||||||
requests:
|
|
||||||
cpu: "100m"
|
|
||||||
memory: "128Mi"
|
|
||||||
persistence:
|
|
||||||
enabled: false
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
size: "1Gi"
|
|
||||||
service:
|
|
||||||
enabled: false
|
|
||||||
port: 80
|
|
||||||
type: ClusterIP
|
|
||||||
Loading…
x
Reference in New Issue
Block a user