Compare commits

...

2 Commits

Author SHA1 Message Date
0f7a0d658f fix naming 2024-03-30 14:27:29 -06:00
08b0782645 add service monitor 2024-03-30 14:22:55 -06:00
8 changed files with 44 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: matrix-hookshot name: matrix-hookshot
version: 0.0.3 version: 0.0.5
description: Chart for Matrix Hookshot description: Chart for Matrix Hookshot
keywords: keywords:
- matrix - matrix

View File

@@ -4,7 +4,7 @@ metadata:
name: matrix-hookshot name: matrix-hookshot
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web
@@ -27,7 +27,7 @@ spec:
serviceAccountName: {{ .Release.Name }} serviceAccountName: {{ .Release.Name }}
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
- name: {{ .Release.Name }} - name: matrix-hookshot
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }}
ports: ports:

View File

@@ -2,10 +2,10 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: "{{ .Release.Name }}-webhook" name: matrix-hookshot-webhook
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: "{{ .Release.Name }}-webhook" app.kubernetes.io/name: matrix-hookshot-webhook
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web
@@ -36,10 +36,10 @@ spec:
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: "{{ .Release.Name }}-appservice" name: matrix-hookshot-appservice
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: "{{ .Release.Name }}-appservice" app.kubernetes.io/name: matrix-hookshot-appservice
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web

View File

@@ -1,9 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: "{{ .Release.Name }}-test-connection" name: matrix-hookshot-test-connection
labels: labels:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: matrix-hookshot-test-connection
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web
@@ -16,7 +16,7 @@ spec:
- name: wget - name: wget
image: busybox image: busybox
command: ['wget'] command: ['wget']
args: ['{{ .Release.Name }}:{{ .Values.service.webhook.port }}'] args: ['matrix-hookshot:{{ .Values.service.webhook.port }}']
resources: resources:
limits: limits:
cpu: 500m cpu: 500m

View File

@@ -1,10 +1,10 @@
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: {{ .Release.Name }} name: matrix-hookshot
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web

View File

@@ -0,0 +1,23 @@
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: matrix-hookshot
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
endpoints:
- port: metrics
interval: {{ .Values.metrics.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
path: /metrics
selector:
matchLabels:
app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -1,10 +1,10 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ .Release.Name }} name: matrix-hookshot
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web app.kubernetes.io/component: web
@@ -25,5 +25,5 @@ spec:
protocol: TCP protocol: TCP
name: appservice name: appservice
selector: selector:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: matrix-hookshot
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -33,6 +33,12 @@ ingress:
className: "" className: ""
annotations: {} annotations: {}
host: "" host: ""
metrics:
enabled: false
serviceMonitor:
enabled: false
interval: 15s
scrapeTimeout: 5s
# Reference the following for examples # Reference the following for examples
# https://matrix-org.github.io/matrix-hookshot/latest/setup/sample-configuration.html # https://matrix-org.github.io/matrix-hookshot/latest/setup/sample-configuration.html