-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: change layout * feat: add helm chart * fix: appVersion
- Loading branch information
Showing
23 changed files
with
670 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
apiVersion: v2 | ||
name: pagetron | ||
description: A Helm chart for Kubernetes | ||
|
||
type: application | ||
|
||
version: 0.1.0 | ||
|
||
appVersion: "0.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- with $.Values.backend }} | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
|
||
metadata: | ||
name: pagetron-backend | ||
labels: | ||
app: pagetron | ||
component: backend | ||
|
||
spec: | ||
replicas: {{ .replicas }} | ||
selector: | ||
matchLabels: | ||
app: pagetron | ||
component: backend | ||
|
||
template: | ||
metadata: | ||
labels: | ||
app: pagetron | ||
component: backend | ||
|
||
spec: | ||
containers: | ||
- name: pagetron-backend | ||
|
||
image: "{{ .image.repository }}:{{ .image.tag | default $.Chart.AppVersion }}" | ||
imagePullPolicy: {{ .image.pullPolicy }} | ||
|
||
ports: | ||
- name: http | ||
containerPort: 3000 | ||
protocol: TCP | ||
|
||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
resources: | ||
{{- toYaml .resources | nindent 12 }} | ||
|
||
{{- with .nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- with $.Values.backend }} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
|
||
metadata: | ||
name: pagetron-backend | ||
labels: | ||
app: pagetron | ||
component: backend | ||
|
||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
|
||
selector: | ||
app: pagetron | ||
component: backend | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- with $.Values.blackbox }} | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
|
||
metadata: | ||
name: blackbox | ||
labels: | ||
app: pagetron | ||
component: blackbox | ||
|
||
spec: | ||
replicas: {{ .replicas }} | ||
selector: | ||
matchLabels: | ||
app: pagetron | ||
component: blackbox | ||
|
||
template: | ||
metadata: | ||
labels: | ||
app: pagetron | ||
component: blackbox | ||
|
||
spec: | ||
containers: | ||
- name: blackbox | ||
|
||
image: "{{ .image.repository }}:{{ .image.tag }}" | ||
imagePullPolicy: {{ .image.pullPolicy }} | ||
|
||
ports: | ||
- name: http | ||
containerPort: 9115 | ||
protocol: TCP | ||
|
||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
resources: | ||
{{- toYaml .resources | nindent 12 }} | ||
|
||
{{- with .nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- with $.Values.blackbox }} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
|
||
metadata: | ||
name: blackbox | ||
labels: | ||
app: pagetron | ||
component: blackbox | ||
|
||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 9115 | ||
targetPort: http | ||
protocol: TCP | ||
|
||
selector: | ||
app: pagetron | ||
component: blackbox | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- with $.Values.frontend }} | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
|
||
metadata: | ||
name: pagetron-frontend | ||
labels: | ||
app: pagetron | ||
component: frontend | ||
|
||
spec: | ||
replicas: {{ .replicas }} | ||
selector: | ||
matchLabels: | ||
app: pagetron | ||
component: frontend | ||
|
||
template: | ||
metadata: | ||
labels: | ||
app: pagetron | ||
component: frontend | ||
|
||
spec: | ||
containers: | ||
- name: pagetron-frontend | ||
|
||
image: "{{ .image.repository }}:{{ .image.tag | default $.Chart.AppVersion }}" | ||
imagePullPolicy: {{ .image.pullPolicy }} | ||
|
||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
|
||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
|
||
resources: | ||
{{- toYaml .resources | nindent 12 }} | ||
|
||
{{- with .nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- with $.Values.frontend }} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
|
||
metadata: | ||
name: pagetron-frontend | ||
labels: | ||
app: pagetron | ||
component: frontend | ||
|
||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
|
||
selector: | ||
app: pagetron | ||
component: frontend | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{- with $.Values.housekeeper }} | ||
|
||
--- | ||
|
||
apiVersion: batch/v1 | ||
kind: CronJob | ||
|
||
metadata: | ||
name: pagetron-housekeeper | ||
labels: | ||
app: pagetron | ||
component: housekeeper | ||
|
||
spec: | ||
schedule: {{ .schedule | quote }} | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: housekeeper | ||
image: "{{ .image.repository }}:{{ .image.tag }}" | ||
imagePullPolicy: IfNotPresent | ||
command: ["curl"] | ||
args: | ||
- --request | ||
- POST | ||
- --globoff | ||
- --data-urlencode | ||
- 'match[]={__name__!~"pagetron:.+"}' | ||
- http://pagetron-prometheus:9090/api/v1/admin/tsdb/delete_series | ||
|
||
{{- end }} |
Oops, something went wrong.