dotnet-app
A Dotnet Helm chart for Kubernetes
About this chart
Dotnet
Debug
Если возникает ошибка в джобе хельма связанная с самим чартом (expected key or smth), то локально подменяйте values файл на свой, запустите команду:
helm template . --debug --set global.env=dev
Не забудьте откатить изменения values перед коммитом в репу!
TODO
- Test Chart on multiple dotnet repositories
- Create documentation for that Chart
Just confirm that the chart is worked:
helm template dotnet-app . --set global.env=dev --debug
Source: dotnet-app/templates/service.yaml
apiVersion: v1 kind: Service metadata: name: dotnet-app namespace: "test" labels: app.kubernetes.io/name: dotnet-app helm.sh/chart: dotnet-app-0.1.0 app.kubernetes.io/instance: dotnet-app app.kubernetes.io/managed-by: Helm spec: type: ClusterIP sessionAffinity: None ports: - name: http port: 80 targetPort: http nodePort: null selector: app.kubernetes.io/name: dotnet-app app.kubernetes.io/instance: dotnet-app
Source: dotnet-app/templates/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: dotnet-app namespace: "test" labels: app.kubernetes.io/name: dotnet-app helm.sh/chart: dotnet-app-0.1.0 app.kubernetes.io/instance: dotnet-app app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: app.kubernetes.io/name: dotnet-app app.kubernetes.io/instance: dotnet-app replicas: 1 template: metadata: labels: app.kubernetes.io/name: dotnet-app helm.sh/chart: dotnet-app-0.1.0 app.kubernetes.io/instance: dotnet-app app.kubernetes.io/managed-by: Helm spec: containers: - name: dotnet-app image: node:19.7.0-slim imagePullPolicy: "IfNotPresent" ports: - name: http containerPort: 3000
Source: dotnet-app/templates/tests/test-connection.yaml
apiVersion: v1 kind: Pod metadata: name: "dotnet-app-test-connection" labels: app.kubernetes.io/name: dotnet-app helm.sh/chart: dotnet-app-0.1.0 app.kubernetes.io/instance: dotnet-app app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test spec: containers: - name: wget image: busybox command: ['wget'] args: ['dotnet-app:80'] restartPolicy: Never
Deploy dotnet-app with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dotnet-app on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdotnet-app is pinned at v3.0.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply