Skip to content

Commit

Permalink
feat: crd in helm chart (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: joss <joss@chi.swan.ac.uk>
  • Loading branch information
rdash99 and JossWhittle authored Oct 26, 2023
1 parent d9849fc commit 48e17e0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
37 changes: 37 additions & 0 deletions charts/canary/crds/http-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: canaryhttpmonitors.canary.ukserp.ac.uk
spec:
group: canary.ukserp.ac.uk
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
url:
type: string
interval:
type: int #seconds
expect:
type: array
items:
type: object
properties:
status:
type: int
default: 200
required:
- status
scope: Cluster
names:
plural: canaryhttpmonitors
singular: canaryhttpmonitor
kind: CanaryHTTPMonitor
3 changes: 0 additions & 3 deletions charts/canary/templates/crds/http-monitor.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions charts/canary/templates/monitors/example-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: "canary.ukserp.ac.uk/v1"
kind: CanaryHTTPMonitor
metadata:
name: github
spec:
url: https://api.github.com/octocat
interval: 30 #seconds
expect:
status: 200

0 comments on commit 48e17e0

Please sign in to comment.