From 7e600c7815edfd62caadc42f4c12827f3dd2f524 Mon Sep 17 00:00:00 2001 From: Mihir Samdarshi Date: Sat, 30 Sep 2023 18:00:33 -0700 Subject: [PATCH] feat: add monitoring app --- kubernetes/apps/default/kustomization.yaml | 1 + .../apps/default/other/app/deployment.yaml | 32 +++++++++++++++++++ .../other/app/ghcr_registry_auth.sops.yaml | 28 ++++++++++++++++ .../apps/default/other/app/kustomization.yaml | 7 ++++ kubernetes/apps/default/other/ks.yaml | 16 ++++++++++ 5 files changed, 84 insertions(+) create mode 100644 kubernetes/apps/default/other/app/deployment.yaml create mode 100644 kubernetes/apps/default/other/app/ghcr_registry_auth.sops.yaml create mode 100644 kubernetes/apps/default/other/app/kustomization.yaml create mode 100644 kubernetes/apps/default/other/ks.yaml diff --git a/kubernetes/apps/default/kustomization.yaml b/kubernetes/apps/default/kustomization.yaml index 3aa977c6e..be40481ab 100644 --- a/kubernetes/apps/default/kustomization.yaml +++ b/kubernetes/apps/default/kustomization.yaml @@ -4,3 +4,4 @@ kind: Kustomization resources: - ./namespace.yaml - ./hajimari/ks.yaml + - ./other/ks.yaml diff --git a/kubernetes/apps/default/other/app/deployment.yaml b/kubernetes/apps/default/other/app/deployment.yaml new file mode 100644 index 000000000..fd6289ca9 --- /dev/null +++ b/kubernetes/apps/default/other/app/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: apple-stock-monitor + labels: + app: apple-stock-monitor +spec: + replicas: 1 + selector: + matchLabels: + app: apple-stock-monitor + template: + metadata: + name: apple-stock-monitor + annotations: + reloader.stakater.com/auto: "true" + labels: + app: apple-stock-monitor + spec: + containers: + - name: apple-stock-monitor + image: ghcr.io/mihirsamdarshi/apple-stock-notifier/app:0.2.1 + imagePullPolicy: IfNotPresent + resources: + limits: + memory: "128Mi" + cpu: "200m" + + restartPolicy: Always + imagePullSecrets: + - name: ghcr-registry-auth + diff --git a/kubernetes/apps/default/other/app/ghcr_registry_auth.sops.yaml b/kubernetes/apps/default/other/app/ghcr_registry_auth.sops.yaml new file mode 100644 index 000000000..de8340c64 --- /dev/null +++ b/kubernetes/apps/default/other/app/ghcr_registry_auth.sops.yaml @@ -0,0 +1,28 @@ +kind: Secret +type: kubernetes.io/dockerconfigjson +apiVersion: v1 +metadata: + name: ghcr-registry-auth + namespace: default +data: + .dockerconfigjson: ENC[AES256_GCM,data:k5jJXS17yLi82DhPEqk2DMTRCV0m50dRDRmhbN8vyXi4w34Brm6HdnzYXdKGOqlWhS+ZkaVOOrgWvi173lahPtsa+moplP6ih9N3sLC09Z6omOLZZYyJeY7UXEU8Szl2KkTgkXhwvaxvami+4JAqDeUp4zCpt8cm0owED7gMFzzJrW2Uj6UfcUInbNnYI1JY9fsmv9r8dKHpzz4ilr+7jnumaPy2EYPwDJ4R2rsZdHGXHCaHik8iD07yAWQKm6mjOsQlXMreHMVPIivjwUYSEm8KAT0tcGc9QPOjZ9rBUaPsjRbjq3uLpf9lZbDD9LAe9LXxQ+FALhscdUtCINx3IcqNVB+uvXCaE3Gc5sLDDRBbQHoo2OAknvijMF7Dd5UARLValtyTMSucZ4GyBK/Vpg==,iv:uUhLbJJPAdWZkoR3gYnRrErkh5qDwtBMCtr5Qw8RNtY=,tag:OzHxuTL5L0dzAM1peKCfqQ==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age13p9s7k5su7ns4ys54qfj2cn2kekcv0h0jxg2hdgl68cy9yajvauqk82apf + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiU1BnV0pialhWcnNZc2RF + eGZDVTVBOHFwMGxYZ1FwbkVxYUEvK0oxZjE0CnJvQXBQUTBFSzJDVk9xZ2h4WXA2 + UHlRUEVJOGZWN2sxVFhSNytrTjV4NUkKLS0tIExrVDBuS2JTWnRrSnN4Zjg2RzZU + Mk94dlhNRDFsYWFweURGYU5sWm56V0kK3PQd7p7HXWhnwgwB5V+ThuezHaEacL1l + pqMNKOgk70xoTu5lhCu+Dd1rJDEVgsWH/rMwZwwH7gpsZwWmgUthtw== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2023-10-01T01:26:49Z" + mac: ENC[AES256_GCM,data:2EelBpWAT7R01ltV5joyRzM+aRRKVpobGhvz/scUZ4T/+hGWWMTj5JsQ2rGGzuUf8+iGXcIk92gUBI/GF96ZUFzm/2CxIiX1sR0an/Mf/TdOr/HavzDcg785hsivTB1pf7DlvdfXV6k1m7v71u3mt8hb4QwO83jxgz70WhJiSGM=,iv:zfM9Zbniz1DCjTIQAaVhLgGIAVeLACXOL+ksaz3cx44=,tag:H8ryWA1XEvSz4+oOyQuUuw==,type:str] + pgp: [] + encrypted_regex: ^(data|stringData)$ + version: 3.8.0 diff --git a/kubernetes/apps/default/other/app/kustomization.yaml b/kubernetes/apps/default/other/app/kustomization.yaml new file mode 100644 index 000000000..791f41215 --- /dev/null +++ b/kubernetes/apps/default/other/app/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: default +resources: + - ./deployment.yaml + - ./ghcr_registry_auth.sops.yaml diff --git a/kubernetes/apps/default/other/ks.yaml b/kubernetes/apps/default/other/ks.yaml new file mode 100644 index 000000000..44dbda7ab --- /dev/null +++ b/kubernetes/apps/default/other/ks.yaml @@ -0,0 +1,16 @@ +--- +# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomization_v1beta2.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: cluster-apps-other + namespace: flux-system +spec: + path: ./kubernetes/apps/default/other/app + prune: true + sourceRef: + kind: GitRepository + name: home-kubernetes + interval: 30m + retryInterval: 1m + timeout: 5m