Skip to content

Commit

Permalink
chart: update & add support for integrations mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
nefelim4ag committed Aug 4, 2022
1 parent 7af2918 commit 14fad5a
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helm/pingdom-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: pingdom-operator
description: A Helm chart for Kubernetes
type: application
version: 0.0.5
appVersion: 0.0.2
version: 0.0.6
appVersion: 0.0.3
36 changes: 36 additions & 0 deletions helm/pingdom-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,39 @@ helm install pingdom-operator pingdom-operator/pingdom-operator
Deploy pingdom-operator controller which create/update/delete pingdom checks based on info from ingress objects

# Examples
pingdom-operator search ingresses by annotations, annootations are mapped to pingdom api fields [Pingdom API 3.1](https://docs.pingdom.com/api/#tag/Checks/paths/~1checks~1{checkid}/put):
```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: artifactory-oss
namespace: jfrog
labels:
app: artifactory
annotations:
cert-manager.io/cluster-issuer: zerossl
ingress.kubernetes.io/force-ssl-redirect: 'true'
kubernetes.io/ingress.class: contour
pingdom-operator.io/integrations: '1245676'
pingdom-operator.io/ipv6: 'true'
pingdom-operator.io/name: artifactory.example.com
pingdom-operator.io/probe_filters: 'region: EU'
pingdom-operator.io/shouldnotcontain: no healthy upstream
spec:
rules:
- host: artifactory.example.com
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: artifactory
port:
number: 8082
# Evaluated as https true and enable ssl on pingdom
tls:
- hosts:
- artifactory.example.com
secretName: artifactory-tls
```
8 changes: 8 additions & 0 deletions helm/pingdom-operator/templates/deploy.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ spec:
{{- end }}
{{- end }}
resources: {{ .Values.resources | toJson }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $.Release.Name }}-integrations
data:
integrations: |
{{ .Values.integrations | toJson | indent 4}}
11 changes: 10 additions & 1 deletion helm/pingdom-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: ghcr.io/nefelim4ag/pingdom-operator
tag: 0.0.2
tag: 0.0.3
pullPolicy: IfNotPresent
imagePullSecrets: []

Expand All @@ -19,7 +19,16 @@ env:
CLUSTER_NAME: "default-cluster"
DRY_RUN: "False"
BEARER_TOKEN: ""
INTEGRATIONS_MAPPING:
valueFrom:
configMapKeyRef:
name: "{{ .Release.Name }}-integrations"
key: integrations

hostNetwork: true

dnsConfig: {}

# Dictionary
integrations: {}
# "integration name": 1234

0 comments on commit 14fad5a

Please sign in to comment.