Simple CLI that update users in Slack user groups based on OpsGenie on-call schedules.
Learn more: disturbed_cli.
This chart creates a disturbed-cli cronjob on a Kubernetes cluster using the Helm package manager.
helm repo add hpedrorodrigues-charts https://hpedrorodrigues.github.io/helm-charts
helm repo update
See helm repo
for command documentation.
helm install [RELEASE_NAME] hpedrorodrigues-charts/disturbed-cli
See configuration below.
See helm install for command documentation.
helm uninstall [RELEASE_NAME]
This removes all the Kubernetes components associated with the chart and deletes the release.
See helm uninstall for command documentation.
helm upgrade [RELEASE_NAME] [CHART] --install
See helm upgrade for command documentation.
See Customizing the chart before installing. To check all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:
helm show values hpedrorodrigues-charts/disturbed-cli
namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: disturbed-cli
repository.yaml
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: disturbed-cli
spec:
interval: 1h
url: https://hpedrorodrigues.github.io/helm-charts
release.yaml
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: disturbed-cli
spec:
interval: 1h
chart:
spec:
chart: disturbed-cli
version: <version>
sourceRef:
kind: HelmRepository
name: disturbed-cli
values:
env:
- name: DISTURBED_SLACK_API_TOKEN
valueFrom:
secretKeyRef:
name: disturbed-cli
key: DISTURBED_SLACK_API_TOKEN
- name: DISTURBED_OPSGENIE_API_KEY
valueFrom:
secretKeyRef:
name: disturbed-cli
key: DISTURBED_OPSGENIE_API_KEY
configuration:
content: |-
schedules_mapping:
- schedule_name: product
user_group_name: 'product-oncall'
- schedule_name: sre
user_group_name: 'sre-oncall'
overrides:
- user_email: [email protected]
timezone: 'America/Fortaleza'
starts_on: '23:00:00'
ends_on: '01:00:00'
repeats_on: weekdays
replace_by:
- [email protected]
external-secret.yaml
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: disturbed-cli
spec:
secretStoreRef:
name: <store-name>
kind: ClusterSecretStore
target:
name: disturbed-cli
deletionPolicy: Delete
data:
- remoteRef:
key: disturbed_cli_secrets
property: opsgenie_api_key
secretKey: DISTURBED_OPSGENIE_API_KEY
- remoteRef:
key: disturbed_cli_secrets
property: slack_api_token
secretKey: DISTURBED_SLACK_API_TOKEN
kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: disturbed-cli
resources:
- namespace.yaml
- repository.yaml
- release.yaml
- secrets.yaml