imfreedom/k8s-cluster
Migrate keel to kustomize and add a discord webhook bridge
--- a/30-keel.yaml Sat Jun 19 18:12:59 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-# keel.sh is a tool to automatically update deployments when external things
-# like image tags change on a registry.
-# This manifest is a cleaned up version of
-# curl "https://sunstone.dev/keel?namespace=keel&username=admin&password=admin&tag=latest"
----
----
----
-apiVersion: rbac.authorization.k8s.io/v1
- - replicationcontrollers
- - delete # required to delete pods during force upgrade of the same tag
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
- apiGroup: rbac.authorization.k8s.io
----
----
- serviceAccountName: keel
- image: keelhq/keel:latest
- imagePullPolicy: Always
- fieldPath: metadata.namespace
- # Basic auth (to enable UI/API)
- - name: BASIC_AUTH_USER
- - name: BASIC_AUTH_PASSWORD
- - name: AUTHENTICATED_WEBHOOKS
- - name: NOTIFICATION_LEVEL
- # Enable insecure registries
- - name: INSECURE_REGISTRY
- initialDelaySeconds: 30
----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/30-keel/discord-bridge.yaml Sun Jul 04 23:31:52 2021 -0500
@@ -0,0 +1,75 @@
+# This is a keel to discord bridge from +# https://github.com/Gabisonfire/discord-keel-bridge. Its been tweaked a bit +# to set the webhook url from a secret, add resources limits, have 2 replicas, +# add a pod disruption budget, and anti affinity rules. +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget + name: discord-keel-bridge + app: discord-keel-bridge + name: discord-keel-bridge + revisionHistoryLimit: 0 + app: discord-keel-bridge + app: discord-keel-bridge + preferredDuringSchedulingIgnoredDuringExecution: + topologyKey: failure-domain.beta.kubernetes.io/region + - name: discord-keel-bridge + image: gabisonfire/discord-keel-bridge:1.0 + - name: DISCORD_BRIDGE_URL + name: discord-keel-bridge + - name: DISCORD_BRIDGE_PORT + name: discord-keel-bridge + app: discord-keel-bridge --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/30-keel/kustomization.yaml Sun Jul 04 23:31:52 2021 -0500
@@ -0,0 +1,12 @@
+ - name: discord-keel-bridge + disableNameSuffixHash: true --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/30-keel/manifest.yaml Sun Jul 04 23:31:52 2021 -0500
@@ -0,0 +1,156 @@
+# keel.sh is a tool to automatically update deployments when external things +# like image tags change on a registry. +# This manifest is a cleaned up version of +# curl "https://sunstone.dev/keel?namespace=keel&username=admin&password=admin&tag=latest" +apiVersion: rbac.authorization.k8s.io/v1 + - replicationcontrollers + - delete # required to delete pods during force upgrade of the same tag +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding + apiGroup: rbac.authorization.k8s.io + serviceAccountName: keel + image: keelhq/keel:latest + imagePullPolicy: Always + fieldPath: metadata.namespace + # Basic auth (to enable UI/API) + - name: BASIC_AUTH_USER + - name: BASIC_AUTH_PASSWORD + - name: AUTHENTICATED_WEBHOOKS + - name: NOTIFICATION_LEVEL + # Enable insecure registries + - name: INSECURE_REGISTRY + - name: WEBHOOK_ENDPOINT + value: "http://discord-keel-bridge:5000/v1/incoming" + initialDelaySeconds: 30