First commit
This commit is contained in:
commit
fe0ccff5e6
1
README.md
Normal file
1
README.md
Normal file
@ -0,0 +1 @@
|
||||
This package defines the Infrastructure components that serve the blog defined [here](https://gitea.scubbo.org/scubbo/blogContent) at [this site](https://blog.scubbo.org/).
|
7
helm/Chart.yaml
Normal file
7
helm/Chart.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
apiVersion: v2
|
||||
name: blog-infrastructure
|
||||
description: The Infrastructure underlying blog.scubbo.org
|
||||
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.1.0"
|
1
helm/deployed-images/prod
Normal file
1
helm/deployed-images/prod
Normal file
@ -0,0 +1 @@
|
||||
43dfbf4841
|
13
helm/templates/_helpers.tpl
Normal file
13
helm/templates/_helpers.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
{{- define "imageTag" }}
|
||||
{{- $val := "" }}
|
||||
{{- if and (hasKey .Values.image "tag") (.Values.image.tag) }}
|
||||
{{- $val = .Values.image.tag }}
|
||||
{{- else }}
|
||||
{{- $val = (.Files.Get (printf "%s/%s" "deployed-images" (required "You must set targetEnv if image.tag is absent!" .Values.targetEnv))) }}
|
||||
{{- end }}
|
||||
{{- trim $val }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "fullImageName" -}}
|
||||
{{- printf "%s:%s" .Values.image.repository (include "imageTag" .) }}
|
||||
{{- end }}
|
42
helm/templates/deployment.yaml
Normal file
42
helm/templates/deployment.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blog-svc-cip
|
||||
namespace: blog
|
||||
spec:
|
||||
ports:
|
||||
- port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
role: app
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: blog-deployment
|
||||
labels:
|
||||
role: app
|
||||
namespace: blog
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
role: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: app
|
||||
spec:
|
||||
containers:
|
||||
# Guidance on how to set up interaction with secure registry:
|
||||
# https://github.com/k3s-io/k3s/issues/1148#issuecomment-641687668
|
||||
# (Unique to rancher/k3s. On traditional k8s installs, I suspect https://github.com/kubernetes/kubernetes/issues/43924
|
||||
# is the way)
|
||||
- name: app
|
||||
image: {{ include "fullImageName" . }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
2
helm/values.yaml
Normal file
2
helm/values.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
image:
|
||||
repository: gitea.scubbo.org/scubbo/blog_helm
|
Loading…
x
Reference in New Issue
Block a user