From d075a47f0388e561ea8d8f647b8fec181d7fc0d5 Mon Sep 17 00:00:00 2001 From: alexlebens Date: Thu, 13 Jun 2024 10:53:52 -0500 Subject: [PATCH] remove hookshot --- charts/matrix-hookshot/Chart.yaml | 14 - charts/matrix-hookshot/templates/_helpers.tpl | 43 --- .../matrix-hookshot/templates/deployment.yaml | 79 ------ charts/matrix-hookshot/templates/ingress.yaml | 100 ------- charts/matrix-hookshot/templates/pod.yaml | 26 -- charts/matrix-hookshot/templates/secret.yaml | 52 ---- .../templates/service-account.yaml | 11 - .../templates/service-monitor.yaml | 23 -- charts/matrix-hookshot/templates/service.yaml | 33 --- charts/matrix-hookshot/values.yaml | 248 ------------------ 10 files changed, 629 deletions(-) delete mode 100644 charts/matrix-hookshot/Chart.yaml delete mode 100644 charts/matrix-hookshot/templates/_helpers.tpl delete mode 100644 charts/matrix-hookshot/templates/deployment.yaml delete mode 100644 charts/matrix-hookshot/templates/ingress.yaml delete mode 100644 charts/matrix-hookshot/templates/pod.yaml delete mode 100644 charts/matrix-hookshot/templates/secret.yaml delete mode 100644 charts/matrix-hookshot/templates/service-account.yaml delete mode 100644 charts/matrix-hookshot/templates/service-monitor.yaml delete mode 100644 charts/matrix-hookshot/templates/service.yaml delete mode 100644 charts/matrix-hookshot/values.yaml diff --git a/charts/matrix-hookshot/Chart.yaml b/charts/matrix-hookshot/Chart.yaml deleted file mode 100644 index 60308c5..0000000 --- a/charts/matrix-hookshot/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v2 -name: matrix-hookshot -version: 0.1.1 -description: Chart for Matrix Hookshot -keywords: - - matrix - - matrix-hookshot - - webhook -sources: - - https://github.com/matrix-org/matrix-hookshot -maintainers: - - name: alexlebens -icon: https://avatars.githubusercontent.com/u/8418310?s=48&v=4 -appVersion: "5.3.0" diff --git a/charts/matrix-hookshot/templates/_helpers.tpl b/charts/matrix-hookshot/templates/_helpers.tpl deleted file mode 100644 index 524523e..0000000 --- a/charts/matrix-hookshot/templates/_helpers.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{{/* -Helper for secret name -*/}} -{{- define "hookshot.secretName" -}} -{{- if .Values.hookshot.existingSecret }} -{{- printf "%s" .Values.hookshot.existingSecret -}} -{{- else }} -{{- printf "matrix-hookshot-config-secret" | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} - -{{/* -Helper for registration secret name -*/}} -{{- define "hookshot.registrationSecretName" -}} -{{- if .Values.hookshot.existingRegistrationSecret }} -{{- printf "%s" .Values.hookshot.existingRegistrationSecret -}} -{{- else }} -{{- printf "matrix-hookshot-registration-secret" }} -{{- end }} -{{- end }} - -{{/* -Helper for passkey secret name -*/}} -{{- define "hookshot.passkeySecretName" -}} -{{- if .Values.hookshot.existingPasskeySecret }} -{{- printf "%s" .Values.hookshot.existingPasskeySecret -}} -{{- else }} -{{- printf "matrix-hookshot-passkey-secret" }} -{{- end }} -{{- end }} - -{{/* -Helper for passkey file name -*/}} -{{- define "hookshot.passFile" -}} -{{- if .Values.hookshot.config.passFile }} -{{- printf "%s" .Values.hookshot.config.passFile -}} -{{- else }} -{{- printf "passkey.pem" }} -{{- end }} -{{- end }} diff --git a/charts/matrix-hookshot/templates/deployment.yaml b/charts/matrix-hookshot/templates/deployment.yaml deleted file mode 100644 index d915a53..0000000 --- a/charts/matrix-hookshot/templates/deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -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: - revisionHistoryLimit: 3 - replicas: {{ .Values.deployment.replicas }} - strategy: - type: {{ .Values.deployment.strategy }} - selector: - matchLabels: - app.kubernetes.io/name: matrix-hookshot - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: matrix-hookshot - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - serviceAccountName: matrix-hookshot - automountServiceAccountToken: true - containers: - - name: matrix-hookshot - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" - imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} - ports: - - name: webhook - containerPort: {{ .Values.service.webhook.port }} - protocol: TCP - - name: metrics - containerPort: {{ .Values.service.metrics.port }} - protocol: TCP - - name: appservice - containerPort: {{ .Values.service.appservice.port }} - protocol: TCP - - name: widgets - containerPort: {{ .Values.service.widgets.port }} - protocol: TCP - env: - {{- range $k,$v := .Values.deployment.env }} - - name: {{ $k }} - value: {{ $v | quote }} - {{- end }} - {{- with .Values.deployment.envFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.deployment.resources | nindent 12 }} - volumeMounts: - - name: config - mountPath: /data/config.yml - subPath: config.yml - readOnly: true - - name: registration - mountPath: /data/registration.yml - subPath: registration.yml - readOnly: true - - name: passkey - mountPath: "/data/{{ template "hookshot.passFile" . }}" - subPath: {{ template "hookshot.passFile" . }} - readOnly: true - volumes: - - name: config - secret: - secretName: {{ template "hookshot.secretName" . }} - - name: registration - secret: - secretName: {{ template "hookshot.registrationSecretName" . }} - - name: passkey - secret: - secretName: {{ template "hookshot.passkeySecretName" . }} diff --git a/charts/matrix-hookshot/templates/ingress.yaml b/charts/matrix-hookshot/templates/ingress.yaml deleted file mode 100644 index 26c702a..0000000 --- a/charts/matrix-hookshot/templates/ingress.yaml +++ /dev/null @@ -1,100 +0,0 @@ -{{- if .Values.ingress.webhook.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: matrix-hookshot-webhook - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-webhook - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} - annotations: - {{- toYaml .Values.ingress.webhook.annotations | nindent 4 }} -spec: - ingressClassName: {{ .Values.ingress.webhook.className }} - tls: - - hosts: - - {{ .Values.ingress.webhook.host }} - secretName: {{ .Release.Name }}-webhook-secret-tls - rules: - - host: {{ .Values.ingress.webhook.host }} - http: - paths: - - path: /webhook/ - pathType: Prefix - backend: - service: - name: {{ .Release.Name }} - port: - name: webhook -{{- end }} - ---- -{{- if .Values.ingress.appservice.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: matrix-hookshot-appservice - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-appservice - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} - annotations: - {{- toYaml .Values.ingress.appservice.annotations | nindent 4 }} -spec: - ingressClassName: {{ .Values.ingress.appservice.className }} - tls: - - hosts: - - {{ .Values.ingress.appservice.host }} - secretName: {{ .Release.Name }}-appservice-secret-tls - rules: - - host: {{ .Values.ingress.appservice.host }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: {{ .Release.Name }} - port: - name: appservice -{{- end }} - ---- -{{- if .Values.ingress.widgets.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: matrix-hookshot-widgets - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-widgets - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} - annotations: - {{- toYaml .Values.ingress.widgets.annotations | nindent 4 }} -spec: - ingressClassName: {{ .Values.ingress.widgets.className }} - tls: - - hosts: - - {{ .Values.ingress.widgets.host }} - secretName: {{ .Release.Name }}-widgets-secret-tls - rules: - - host: {{ .Values.ingress.widgets.host }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: {{ .Release.Name }} - port: - name: widgets -{{- end }} diff --git a/charts/matrix-hookshot/templates/pod.yaml b/charts/matrix-hookshot/templates/pod.yaml deleted file mode 100644 index 80a3205..0000000 --- a/charts/matrix-hookshot/templates/pod.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: matrix-hookshot-test-connection - labels: - app.kubernetes.io/name: matrix-hookshot-test-connection - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} - annotations: - "helm.sh/hook": test-success -spec: - restartPolicy: Never - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['matrix-hookshot:{{ .Values.service.webhook.port }}'] - resources: - limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 50m - memory: 256Mi diff --git a/charts/matrix-hookshot/templates/secret.yaml b/charts/matrix-hookshot/templates/secret.yaml deleted file mode 100644 index ccf009e..0000000 --- a/charts/matrix-hookshot/templates/secret.yaml +++ /dev/null @@ -1,52 +0,0 @@ -{{- if not .Values.hookshot.existingSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: matrix-hookshot-config-secret - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-config - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -data: - config.yml: | -{{ toYaml .Values.hookshot.config | indent 4 }} -{{- end }} - ---- -{{- if not .Values.hookshot.existingRegistrationSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: matrix-hookshot-registration-secret - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-registration - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -data: - registration.yml: | -{{ toYaml .Values.hookshot.registration | indent 4 }} -{{- end }} - ---- -{{- if not .Values.hookshot.existingPasskeySecret }} -apiVersion: v1 -kind: Secret -metadata: - name: matrix-hookshot-passkey-secret - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/name: matrix-hookshot-passkey - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/component: web - app.kubernetes.io/part-of: {{ .Release.Name }} -data: - {{ .Values.hookshot.config.passFile }}: | -{{ toYaml .Values.hookshot.passkey | indent 4 }} -{{- end }} diff --git a/charts/matrix-hookshot/templates/service-account.yaml b/charts/matrix-hookshot/templates/service-account.yaml deleted file mode 100644 index a1cf930..0000000 --- a/charts/matrix-hookshot/templates/service-account.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -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 }} diff --git a/charts/matrix-hookshot/templates/service-monitor.yaml b/charts/matrix-hookshot/templates/service-monitor.yaml deleted file mode 100644 index 99fa23d..0000000 --- a/charts/matrix-hookshot/templates/service-monitor.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- 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 }} diff --git a/charts/matrix-hookshot/templates/service.yaml b/charts/matrix-hookshot/templates/service.yaml deleted file mode 100644 index f69bbae..0000000 --- a/charts/matrix-hookshot/templates/service.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: v1 -kind: Service -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: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.webhook.port }} - targetPort: webhook - protocol: TCP - name: webhook - - port: {{ .Values.service.metrics.port }} - targetPort: metrics - protocol: TCP - name: metrics - - port: {{ .Values.service.appservice.port }} - targetPort: appservice - protocol: TCP - name: appservice - - port: {{ .Values.service.widgets.port }} - targetPort: widgets - protocol: TCP - name: widgets - selector: - app.kubernetes.io/name: matrix-hookshot - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/matrix-hookshot/values.yaml b/charts/matrix-hookshot/values.yaml deleted file mode 100644 index 524f7ee..0000000 --- a/charts/matrix-hookshot/values.yaml +++ /dev/null @@ -1,248 +0,0 @@ -deployment: - replicas: 1 - strategy: Recreate - image: - repository: halfshot/matrix-hookshot - tag: "5.3.0" - imagePullPolicy: IfNotPresent - env: {} - envFrom: [] - resources: - limits: - memory: 512Mi - cpu: 100m - requests: - memory: 256Mi - cpu: 50m -service: - type: ClusterIP - webhook: - port: 9000 - metrics: - port: 9001 - appservice: - port: 9002 - widgets: - port: 9003 -ingress: - webhook: - enabled: false - className: "" - annotations: {} - host: "" - appservice: - enabled: false - className: "" - annotations: {} - host: "" - widgets: - enabled: false - className: "" - annotations: {} - host: "" -metrics: - enabled: false - serviceMonitor: - enabled: false - interval: 15s - scrapeTimeout: 5s - -# Reference the following for examples -# https://matrix-org.github.io/matrix-hookshot/latest/setup/sample-configuration.html -hookshot: - - # config.yml contents - existingSecret: "" - config: - bridge: - domain: example.com - url: http://localhost:8008 - mediaUrl: https://example.com - port: 9993 - bindAddress: 0.0.0.0 - passFile: passkey.pem - logging: - level: info - colorize: true - json: false - timestampFormat: HH:mm:ss:SSS - listeners: - - port: 9000 - bindAddress: 0.0.0.0 - resources: - - webhooks - - port: 9001 - bindAddress: 0.0.0.0 - resources: - - metrics - - provisioning - - port: 9003 - bindAddress: 0.0.0.0 - resources: - - widgets - - # github: - # # (Optional) Configure this to enable GitHub support - # auth: - # # Authentication for the GitHub App. - # id: 123 - # privateKeyFile: github-key.pem - # webhook: - # # Webhook settings for the GitHub app. - # secret: secrettoken - # oauth: - # # (Optional) Settings for allowing users to sign in via OAuth. - # client_id: foo - # client_secret: bar - # redirect_uri: https://example.com/oauth/ - # defaultOptions: - # # (Optional) Default options for GitHub connections. - # showIssueRoomLink: false - # hotlinkIssues: - # prefix: "#" - # userIdPrefix: - # # (Optional) Prefix used when creating ghost users for GitHub accounts. - # _github_ - - # gitlab: - # # (Optional) Configure this to enable GitLab support - # instances: - # gitlab.com: - # url: https://gitlab.com - # webhook: - # secret: secrettoken - # publicUrl: https://example.com/hookshot/ - # userIdPrefix: - # # (Optional) Prefix used when creating ghost users for GitLab accounts. - # _gitlab_ - # commentDebounceMs: - # # (Optional) Aggregate comments by waiting this many miliseconds before posting them to Matrix. Defaults to 5000 (5 seconds) - # 5000 - - # figma: - # # (Optional) Configure this to enable Figma support - # publicUrl: https://example.com/hookshot/ - # instances: - # your-instance: - # teamId: your-team-id - # accessToken: your-personal-access-token - # passcode: your-webhook-passcode - - # jira: - # # (Optional) Configure this to enable Jira support. Only specify `url` if you are using a On Premise install (i.e. not atlassian.com) - # webhook: - # # Webhook settings for JIRA - # secret: secrettoken - # oauth: - # # (Optional) OAuth settings for connecting users to JIRA. See documentation for more information - # client_id: foo - # client_secret: bar - # redirect_uri: https://example.com/oauth/ - - # generic: - # # (Optional) Support for generic webhook events. - # #'allowJsTransformationFunctions' will allow users to write short transformation snippets in code, and thus is unsafe in untrusted environments - - # enabled: false - # enableHttpGet: false - # urlPrefix: https://example.com/webhook/ - # userIdPrefix: _webhooks_ - # allowJsTransformationFunctions: false - # waitForComplete: false - - # feeds: - # # (Optional) Configure this to enable RSS/Atom feed support - # enabled: false - # pollConcurrency: 4 - # pollIntervalSeconds: 600 - # pollTimeoutSeconds: 30 - - # provisioning: - # # (Optional) Provisioning API for integration managers - # secret: "!secretToken" - - # bot: - # # (Optional) Define profile information for the bot user - # displayname: Hookshot Bot - # avatar: mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d - - # serviceBots: - # # (Optional) Define additional bot users for specific services - # - localpart: feeds - # displayname: Feeds - # avatar: ./assets/feeds_avatar.png - # prefix: "!feeds" - # service: feeds - - # metrics: - # # (Optional) Prometheus metrics support - # enabled: true - - # cache: - # # (Optional) Cache options for large scale deployments. - # # For encryption to work, this must be configured. - # redisUri: redis://localhost:6379 - - # queue: - # # (Optional) Message queue configuration options for large scale deployments. - # # For encryption to work, this must not be configured. - # redisUri: redis://localhost:6379 - - # widgets: - # # (Optional) EXPERIMENTAL support for complimentary widgets - # addToAdminRooms: false - # disallowedIpRanges: - # - 127.0.0.0/8 - # - 10.0.0.0/8 - # - 172.16.0.0/12 - # - 192.168.0.0/16 - # - 100.64.0.0/10 - # - 192.0.0.0/24 - # - 169.254.0.0/16 - # - 192.88.99.0/24 - # - 198.18.0.0/15 - # - 192.0.2.0/24 - # - 198.51.100.0/24 - # - 203.0.113.0/24 - # - 224.0.0.0/4 - # - ::1/128 - # - fe80::/10 - # - fc00::/7 - # - 2001:db8::/32 - # - ff00::/8 - # - fec0::/10 - # roomSetupWidget: - # addOnInvite: false - # publicUrl: https://example.com/widgetapi/v1/static/ - # branding: - # widgetTitle: Hookshot Configuration - - # sentry: - # # (Optional) Configure Sentry error reporting - # dsn: https://examplePublicKey@o0.ingest.sentry.io/0 - # environment: production - - # permissions: - # # (Optional) Permissions for using the bridge. See docs/setup.md#permissions for help - # - actor: example.com - # services: - # - service: "*" - # level: admin - - # registration.yml contents - existingRegistrationSecret: "" - registration: - id: matrix-hookshot - as_token: "" - hs_token: "" - namespaces: - rooms: [] - users: [] - sender_localpart: hookshot - url: "http://example.com" - rate_limited: false - - # A passkey used to encrypt tokens stored inside the bridge. - # Run openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096 to generate - existingPasskeySecret: "" - passkey: ""