diff --git a/apps/syncthing/kustomization.yaml b/apps/syncthing/kustomization.yaml index c17a00e..fedc57c 100644 --- a/apps/syncthing/kustomization.yaml +++ b/apps/syncthing/kustomization.yaml @@ -9,6 +9,8 @@ resources: - deployment.yaml - service.yaml - ingress.yaml + - servicemonitor.yaml + - syncthing-api.sealedsecret.yaml images: - name: syncthing diff --git a/apps/syncthing/service.yaml b/apps/syncthing/service.yaml index c3e8ef2..78caccf 100644 --- a/apps/syncthing/service.yaml +++ b/apps/syncthing/service.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Service metadata: name: syncthing-web + label: + app: syncthing spec: selector: app: syncthing @@ -9,6 +11,7 @@ spec: ports: - port: 8384 targetPort: 8384 + name: syncthing-web --- apiVersion: v1 kind: Service diff --git a/apps/syncthing/servicemonitor.yaml b/apps/syncthing/servicemonitor.yaml new file mode 100644 index 0000000..c46c8e6 --- /dev/null +++ b/apps/syncthing/servicemonitor.yaml @@ -0,0 +1,17 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: syncthing-servicemonitor + labels: + app: syncthing +spec: + selector: + matchLabels: + app: syncthing + endpoints: + - port: web + path: /metrics + targetPort: syncthing-web + bearerTokenSecret: + name: syncthing-api + key: token diff --git a/apps/syncthing/syncthing-api.sealedsecret.yaml b/apps/syncthing/syncthing-api.sealedsecret.yaml new file mode 100644 index 0000000..89fe407 --- /dev/null +++ b/apps/syncthing/syncthing-api.sealedsecret.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: syncthing-api + namespace: syncthing +spec: + encryptedData: + token: AgC1hG1aguLIWBgA1R19MGrXDq7BONAldMEXtCeGXLO9Xar08f7qFqprtRJAMOID4trUEBMAkF96m7rH7QHTpO0WzRLrJctLi7U6NgESUJBDxusqjij3RAANS69Xt27mu2oa+rhm605CfFJT6Gpx/2CxrFtUD3yCijilDnEVvw4WvTLHvVQMCd8cM8ZDlpBsSYbxvtCUN1+B02DCucLpMphspxV2SGPAdc04xQD7d0vUhNLekFi0xSgu0jiRGVDHOG5Egd9d/BGeNOBgiUVxJxqqdXc6EmkslcSUtMQJ5luSxjogf+p3jdOqt4aPpUeR8sSPb6OSEIZD/Cfs9X4akHdpUAqkycu+V24lDxeHWAtIviCMBPttrwNAEytgwqaiT0U4UmL5GqR97jpmy3Tx+jYKuXkt4Igb6VByreuL9aZacRrqRhCCgbg95Y/UrYlLAbZYOI/+KsFzB5akGpZXUDcW9h2IkTUmcT+QxWXqEoNpoTI5qAnKiu/9T5elDKghjMHYX+CnPj+rXlQIJzX7NkZ0Q6HpKQ4B2Vd1Ewkvadf963jBodUe7WiMt8UeYgzCa33F4U23JjExIrL8t3r8MQ/IIdtfUvyz6Da1vp5hjpBUnUCk8rca/6VC3GO1GP3DLdIXiZQY1OOTHJlyLG7+bIL35zVfkmLMzmlIdaFsfeYiL4P+hYRbLABPAJk8lY7MEdiczpvI9HlmFVatJaPrFJwx9jyhzqIOq5eGt0OIkFt+fw== + template: + metadata: + creationTimestamp: null + name: syncthing-api + namespace: syncthing + type: Opaque