From ebd3e2a657af30c703e74985eb7a2736d41c824f Mon Sep 17 00:00:00 2001 From: adityathebe Date: Sun, 17 Dec 2023 10:41:56 +0000 Subject: [PATCH 1/2] chore: bump duty to v1.0.240 --- go.mod | 3 ++- go.sum | 10 ++++++++-- hack/generate-schemas/go.mod | 3 ++- hack/generate-schemas/go.sum | 10 ++++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 33f9c4015..e9692bef3 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/containrrr/shoutrrr v0.8.0 github.com/fergusstrange/embedded-postgres v1.24.0 github.com/flanksource/commons v1.19.0 - github.com/flanksource/duty v1.0.237 + github.com/flanksource/duty v1.0.240 github.com/flanksource/gomplate/v3 v3.20.26 github.com/flanksource/kopper v1.0.6 github.com/flanksource/postq v0.1.2 @@ -71,6 +71,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/RaveNoX/go-jsonmerge v1.0.0 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect diff --git a/go.sum b/go.sum index e4a76ccda..518a19f5a 100644 --- a/go.sum +++ b/go.sum @@ -648,6 +648,9 @@ github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCv github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/RaveNoX/go-jsonmerge v1.0.0 h1:2e0nqnadoGUP8rAvcA0hkQelZreVO5X3BHomT2XMrAk= +github.com/RaveNoX/go-jsonmerge v1.0.0/go.mod h1:qYM/NA77LhO4h51JJM7Z+xBU3ovqrNIACZe+SkSNVFo= github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 h1:vfVc5pSCq58ljNpXXwUcLnHATYi/x+YUdqFc9uBhLbM= github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36/go.mod h1:MwE/QxFCN65F0hKGWFHUh2U2o1p2tMPNR1zHkX6vEh8= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= @@ -723,6 +726,7 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1U github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bluekeyes/go-gitdiff v0.7.1 h1:graP4ElLRshr8ecu0UtqfNTCHrtSyZd3DABQm/DWesQ= github.com/bluekeyes/go-gitdiff v0.7.1/go.mod h1:QpfYYO1E0fTVHVZAZKiRjtSGY9823iCdvGXBcEzHGbM= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= @@ -815,8 +819,8 @@ github.com/flanksource/artifacts v1.0.0 h1:Fer3firlsI1L0YoOoUOw77w7j4PgtMkNTsQDY github.com/flanksource/artifacts v1.0.0/go.mod h1:KWGcGNGTJe+wb/Pv31thiWsNSdhu7iWqRO/hApLflyA= github.com/flanksource/commons v1.19.0 h1:wvebMLVHnSMzmyw0QAmIJhl+YaQzsBSY6BQKgID458c= github.com/flanksource/commons v1.19.0/go.mod h1:k+3B7McXUOS+TirYFR9h0pPk6mHNG3dqVUEY9gKI3/U= -github.com/flanksource/duty v1.0.237 h1:0ZcH/AAojn9Eupc360fnl5CRJTxD0l5/WtUNYWJaP80= -github.com/flanksource/duty v1.0.237/go.mod h1:6JdeVPo9aKq/nowsP60CTHQxe+oUPu6maMbusIApB8o= +github.com/flanksource/duty v1.0.240 h1:R3UyiGs4gQOyG5LzauTymR+MCoHdzduYwdOk1lJXiYE= +github.com/flanksource/duty v1.0.240/go.mod h1:tT+MmnSlSJMeBrFGzWDES/vKOW26g+y3i907/IJrd1s= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.20.26 h1:85lUzlKgZjb1uIkzoa4zN03OcdOnFPG+oWxshZTYqz4= github.com/flanksource/gomplate/v3 v3.20.26/go.mod h1:GKmptFMdr2LbOuqwQZrmo9a/UygyZ0pbXffks8MuYhE= @@ -1150,6 +1154,7 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= @@ -1365,6 +1370,7 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= diff --git a/hack/generate-schemas/go.mod b/hack/generate-schemas/go.mod index f72d17340..34654c85e 100644 --- a/hack/generate-schemas/go.mod +++ b/hack/generate-schemas/go.mod @@ -20,6 +20,7 @@ require ( github.com/AlekSi/pointer v1.2.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect + github.com/RaveNoX/go-jsonmerge v1.0.0 // indirect github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect @@ -31,7 +32,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible // indirect - github.com/flanksource/duty v1.0.237 // indirect + github.com/flanksource/duty v1.0.240 // indirect github.com/flanksource/gomplate/v3 v3.20.26 // indirect github.com/flanksource/is-healthy v0.0.0-20231003215854-76c51e3a3ff7 // indirect github.com/flanksource/kommons v0.31.4 // indirect diff --git a/hack/generate-schemas/go.sum b/hack/generate-schemas/go.sum index ebe5a1cc3..6e0bdaa2e 100644 --- a/hack/generate-schemas/go.sum +++ b/hack/generate-schemas/go.sum @@ -621,6 +621,9 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/RaveNoX/go-jsonmerge v1.0.0 h1:2e0nqnadoGUP8rAvcA0hkQelZreVO5X3BHomT2XMrAk= +github.com/RaveNoX/go-jsonmerge v1.0.0/go.mod h1:qYM/NA77LhO4h51JJM7Z+xBU3ovqrNIACZe+SkSNVFo= github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 h1:vfVc5pSCq58ljNpXXwUcLnHATYi/x+YUdqFc9uBhLbM= github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36/go.mod h1:MwE/QxFCN65F0hKGWFHUh2U2o1p2tMPNR1zHkX6vEh8= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -651,6 +654,7 @@ github.com/aws/aws-sdk-go v1.48.10 h1:0LIFG3wp2Dt6PsxKWCg1Y1xRrn2vZnW5/gWdgaBalK github.com/aws/aws-sdk-go v1.48.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -711,8 +715,8 @@ github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flanksource/commons v1.19.0 h1:wvebMLVHnSMzmyw0QAmIJhl+YaQzsBSY6BQKgID458c= github.com/flanksource/commons v1.19.0/go.mod h1:k+3B7McXUOS+TirYFR9h0pPk6mHNG3dqVUEY9gKI3/U= -github.com/flanksource/duty v1.0.237 h1:0ZcH/AAojn9Eupc360fnl5CRJTxD0l5/WtUNYWJaP80= -github.com/flanksource/duty v1.0.237/go.mod h1:6JdeVPo9aKq/nowsP60CTHQxe+oUPu6maMbusIApB8o= +github.com/flanksource/duty v1.0.240 h1:R3UyiGs4gQOyG5LzauTymR+MCoHdzduYwdOk1lJXiYE= +github.com/flanksource/duty v1.0.240/go.mod h1:tT+MmnSlSJMeBrFGzWDES/vKOW26g+y3i907/IJrd1s= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.20.26 h1:85lUzlKgZjb1uIkzoa4zN03OcdOnFPG+oWxshZTYqz4= github.com/flanksource/gomplate/v3 v3.20.26/go.mod h1:GKmptFMdr2LbOuqwQZrmo9a/UygyZ0pbXffks8MuYhE= @@ -977,6 +981,7 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= @@ -1129,6 +1134,7 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= From 8227a495e5cbb7419d9dd12828d65e43131a662d Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Sun, 17 Dec 2023 16:31:23 +0545 Subject: [PATCH 2/2] chore: make manifests --- ...n-control.flanksource.com_connections.yaml | 55 +++++ ...ion-control.flanksource.com_playbooks.yaml | 200 ++++++++++++++++++ config/schemas/connection.schema.json | 2 +- config/schemas/playbook.schema.json | 2 +- playbook/webhook_test.go | 2 +- 5 files changed, 258 insertions(+), 3 deletions(-) diff --git a/config/crds/mission-control.flanksource.com_connections.yaml b/config/crds/mission-control.flanksource.com_connections.yaml index cd306ca0b..5421d185f 100644 --- a/config/crds/mission-control.flanksource.com_connections.yaml +++ b/config/crds/mission-control.flanksource.com_connections.yaml @@ -52,6 +52,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used to fetch + the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -86,6 +97,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used to fetch + the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -118,6 +140,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used to fetch + the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -158,6 +191,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used to fetch + the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -190,6 +234,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used to fetch + the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: diff --git a/config/crds/mission-control.flanksource.com_playbooks.yaml b/config/crds/mission-control.flanksource.com_playbooks.yaml index 47236eab2..3277218de 100644 --- a/config/crds/mission-control.flanksource.com_playbooks.yaml +++ b/config/crds/mission-control.flanksource.com_playbooks.yaml @@ -75,6 +75,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -115,6 +127,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -149,6 +173,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -186,6 +222,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -232,6 +280,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -265,6 +325,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -309,6 +381,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -342,6 +426,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -386,6 +482,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -426,6 +534,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -559,6 +678,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -603,6 +733,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used + to fetch the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -642,6 +783,17 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression used + to fetch the key from the merged JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -877,6 +1029,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -909,6 +1073,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -949,6 +1125,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: @@ -994,6 +1182,18 @@ spec: required: - key type: object + helmRef: + properties: + key: + description: Key is a JSONPath expression + used to fetch the key from the merged + JSON. + type: string + name: + type: string + required: + - key + type: object secretKeyRef: properties: key: diff --git a/config/schemas/connection.schema.json b/config/schemas/connection.schema.json index cb2b17ba5..0817362e0 100644 --- a/config/schemas/connection.schema.json +++ b/config/schemas/connection.schema.json @@ -1 +1 @@ -{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Connection","definitions":{"ConfigMapKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Connection":{"required":["TypeMeta"],"properties":{"TypeMeta":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/TypeMeta"},"metadata":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ObjectMeta"},"spec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConnectionSpec"},"status":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConnectionStatus"}},"additionalProperties":false,"type":"object"},"ConnectionSpec":{"properties":{"url":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVar"},"port":{"$ref":"#/definitions/EnvVar"},"type":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"certificate":{"$ref":"#/definitions/EnvVar"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"insecure_tls":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"ConnectionStatus":{"properties":{},"additionalProperties":false,"type":"object"},"EnvVar":{"properties":{"name":{"type":"string"},"value":{"type":"string"},"valueFrom":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVarSource"}},"additionalProperties":false,"type":"object"},"EnvVarSource":{"properties":{"serviceAccount":{"type":"string"},"configMapKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConfigMapKeySelector"},"secretKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SecretKeySelector"}},"additionalProperties":false,"type":"object"},"FieldsV1":{"properties":{},"additionalProperties":false,"type":"object"},"ManagedFieldsEntry":{"properties":{"manager":{"type":"string"},"operation":{"type":"string"},"apiVersion":{"type":"string"},"time":{"$ref":"#/definitions/Time"},"fieldsType":{"type":"string"},"fieldsV1":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/FieldsV1"},"subresource":{"type":"string"}},"additionalProperties":false,"type":"object"},"ObjectMeta":{"properties":{"name":{"type":"string"},"generateName":{"type":"string"},"namespace":{"type":"string"},"selfLink":{"type":"string"},"uid":{"type":"string"},"resourceVersion":{"type":"string"},"generation":{"type":"integer"},"creationTimestamp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Time"},"deletionTimestamp":{"$ref":"#/definitions/Time"},"deletionGracePeriodSeconds":{"type":"integer"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"annotations":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"ownerReferences":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/OwnerReference"},"type":"array"},"finalizers":{"items":{"type":"string"},"type":"array"},"managedFields":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ManagedFieldsEntry"},"type":"array"}},"additionalProperties":false,"type":"object"},"OwnerReference":{"required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"uid":{"type":"string"},"controller":{"type":"boolean"},"blockOwnerDeletion":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"SecretKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Time":{"properties":{},"additionalProperties":false,"type":"object"},"TypeMeta":{"properties":{"kind":{"type":"string"},"apiVersion":{"type":"string"}},"additionalProperties":false,"type":"object"}}} \ No newline at end of file +{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Connection","definitions":{"ConfigMapKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Connection":{"required":["TypeMeta"],"properties":{"TypeMeta":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/TypeMeta"},"metadata":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ObjectMeta"},"spec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConnectionSpec"},"status":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConnectionStatus"}},"additionalProperties":false,"type":"object"},"ConnectionSpec":{"properties":{"url":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVar"},"port":{"$ref":"#/definitions/EnvVar"},"type":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"certificate":{"$ref":"#/definitions/EnvVar"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"insecure_tls":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"ConnectionStatus":{"properties":{},"additionalProperties":false,"type":"object"},"EnvVar":{"properties":{"name":{"type":"string"},"value":{"type":"string"},"valueFrom":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVarSource"}},"additionalProperties":false,"type":"object"},"EnvVarSource":{"properties":{"serviceAccount":{"type":"string"},"helmRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/HelmRefKeySelector"},"configMapKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConfigMapKeySelector"},"secretKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SecretKeySelector"}},"additionalProperties":false,"type":"object"},"FieldsV1":{"properties":{},"additionalProperties":false,"type":"object"},"HelmRefKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"ManagedFieldsEntry":{"properties":{"manager":{"type":"string"},"operation":{"type":"string"},"apiVersion":{"type":"string"},"time":{"$ref":"#/definitions/Time"},"fieldsType":{"type":"string"},"fieldsV1":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/FieldsV1"},"subresource":{"type":"string"}},"additionalProperties":false,"type":"object"},"ObjectMeta":{"properties":{"name":{"type":"string"},"generateName":{"type":"string"},"namespace":{"type":"string"},"selfLink":{"type":"string"},"uid":{"type":"string"},"resourceVersion":{"type":"string"},"generation":{"type":"integer"},"creationTimestamp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Time"},"deletionTimestamp":{"$ref":"#/definitions/Time"},"deletionGracePeriodSeconds":{"type":"integer"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"annotations":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"ownerReferences":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/OwnerReference"},"type":"array"},"finalizers":{"items":{"type":"string"},"type":"array"},"managedFields":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ManagedFieldsEntry"},"type":"array"}},"additionalProperties":false,"type":"object"},"OwnerReference":{"required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"uid":{"type":"string"},"controller":{"type":"boolean"},"blockOwnerDeletion":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"SecretKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Time":{"properties":{},"additionalProperties":false,"type":"object"},"TypeMeta":{"properties":{"kind":{"type":"string"},"apiVersion":{"type":"string"}},"additionalProperties":false,"type":"object"}}} \ No newline at end of file diff --git a/config/schemas/playbook.schema.json b/config/schemas/playbook.schema.json index b1714f851..7ca583d7b 100644 --- a/config/schemas/playbook.schema.json +++ b/config/schemas/playbook.schema.json @@ -1 +1 @@ -{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Playbook","definitions":{"AWSConnection":{"properties":{"connection":{"type":"string"},"accessKey":{"$ref":"#/definitions/EnvVar"},"secretKey":{"$ref":"#/definitions/EnvVar"},"sessionToken":{"$ref":"#/definitions/EnvVar"},"region":{"type":"string"},"endpoint":{"type":"string"},"skipTLSVerify":{"type":"boolean"},"objectPath":{"type":"string"},"usePathStyle":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"Artifact":{"required":["path"],"properties":{"path":{"type":"string"}},"additionalProperties":false,"type":"object"},"AzureConnection":{"properties":{"connection":{"type":"string"},"clientID":{"$ref":"#/definitions/EnvVar"},"clientSecret":{"$ref":"#/definitions/EnvVar"},"tenantID":{"type":"string"}},"additionalProperties":false,"type":"object"},"ConfigMapKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"EnvVar":{"properties":{"name":{"type":"string"},"value":{"type":"string"},"valueFrom":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVarSource"}},"additionalProperties":false,"type":"object"},"EnvVarSource":{"properties":{"serviceAccount":{"type":"string"},"configMapKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConfigMapKeySelector"},"secretKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SecretKeySelector"}},"additionalProperties":false,"type":"object"},"ExecAction":{"required":["script"],"properties":{"script":{"type":"string"},"connections":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ExecConnections"},"artifacts":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Artifact"},"type":"array"},"env":{"items":{"$ref":"#/definitions/EnvVar"},"type":"array"},"checkout":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitCheckout"}},"additionalProperties":false,"type":"object"},"ExecConnections":{"properties":{"aws":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/AWSConnection"},"gcp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GCPConnection"},"azure":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/AzureConnection"}},"additionalProperties":false,"type":"object"},"FieldsV1":{"properties":{},"additionalProperties":false,"type":"object"},"GCPConnection":{"properties":{"connection":{"type":"string"},"endpoint":{"type":"string"},"credentials":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"GitCheckout":{"properties":{"url":{"type":"string"},"connection":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"certificate":{"$ref":"#/definitions/EnvVar"},"destination":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsAction":{"required":["repo","commit"],"properties":{"repo":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionRepo"},"commit":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionCommit"},"pr":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionPR"},"patches":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionPatch"},"type":"array"},"files":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionFile"},"type":"array"}},"additionalProperties":false,"type":"object"},"GitOpsActionCommit":{"required":["author","email","message"],"properties":{"author":{"type":"string"},"email":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionFile":{"required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionPR":{"required":["title"],"properties":{"title":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"GitOpsActionPatch":{"required":["path"],"properties":{"path":{"type":"string"},"yq":{"type":"string"},"jq":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionRepo":{"required":["url"],"properties":{"url":{"type":"string"},"base":{"type":"string"},"branch":{"type":"string"},"connection":{"type":"string"}},"additionalProperties":false,"type":"object"},"HTTPAction":{"properties":{"connection":{"type":"string"},"url":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"method":{"type":"string"},"ntlm":{"type":"boolean"},"ntlmv2":{"type":"boolean"},"headers":{"items":{"$ref":"#/definitions/EnvVar"},"type":"array"},"body":{"type":"string"},"templateBody":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"ManagedFieldsEntry":{"properties":{"manager":{"type":"string"},"operation":{"type":"string"},"apiVersion":{"type":"string"},"time":{"$ref":"#/definitions/Time"},"fieldsType":{"type":"string"},"fieldsV1":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/FieldsV1"},"subresource":{"type":"string"}},"additionalProperties":false,"type":"object"},"NotificationAction":{"required":["title","message"],"properties":{"url":{"type":"string"},"connection":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"ObjectMeta":{"properties":{"name":{"type":"string"},"generateName":{"type":"string"},"namespace":{"type":"string"},"selfLink":{"type":"string"},"uid":{"type":"string"},"resourceVersion":{"type":"string"},"generation":{"type":"integer"},"creationTimestamp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Time"},"deletionTimestamp":{"$ref":"#/definitions/Time"},"deletionGracePeriodSeconds":{"type":"integer"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"annotations":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"ownerReferences":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/OwnerReference"},"type":"array"},"finalizers":{"items":{"type":"string"},"type":"array"},"managedFields":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ManagedFieldsEntry"},"type":"array"}},"additionalProperties":false,"type":"object"},"OwnerReference":{"required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"uid":{"type":"string"},"controller":{"type":"boolean"},"blockOwnerDeletion":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"Permission":{"properties":{"role":{"type":"string"},"team":{"type":"string"},"ref":{"type":"string"}},"additionalProperties":false,"type":"object"},"Playbook":{"properties":{"kind":{"type":"string"},"apiVersion":{"type":"string"},"metadata":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ObjectMeta"},"spec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookSpec"},"status":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookStatus"}},"additionalProperties":false,"type":"object"},"PlaybookAction":{"required":["name"],"properties":{"name":{"type":"string"},"delay":{"type":"string"},"timeout":{"type":"string"},"exec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ExecAction"},"gitops":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsAction"},"http":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/HTTPAction"},"sql":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SQLAction"},"pod":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PodAction"},"notification":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/NotificationAction"}},"additionalProperties":false,"type":"object"},"PlaybookApproval":{"properties":{"type":{"type":"string"},"approvers":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookApprovers"}},"additionalProperties":false,"type":"object"},"PlaybookApprovers":{"properties":{"people":{"items":{"type":"string"},"type":"array"},"teams":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuth":{"properties":{"basic":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthBasic"},"github":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthGithub"},"svix":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthSVIX"},"jwt":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthJWT"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthBasic":{"required":["username","password"],"properties":{"username":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthGithub":{"required":["token"],"properties":{"token":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthJWT":{"required":["jwksUri"],"properties":{"jwksUri":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthSVIX":{"required":["secret"],"properties":{"secret":{"$ref":"#/definitions/EnvVar"},"verifyTimestamp":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookParameter":{"required":["name","label"],"properties":{"name":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"icon":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"PlaybookResourceFilter":{"properties":{"type":{"type":"string"},"tags":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"PlaybookSpec":{"required":["actions"],"properties":{"description":{"type":"string"},"icon":{"type":"string"},"on":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTrigger"},"permissions":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Permission"},"type":"array"},"configs":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"checks":{"items":{"$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"components":{"items":{"$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"parameters":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookParameter"},"type":"array"},"actions":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookAction"},"type":"array"},"approval":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookApproval"}},"additionalProperties":false,"type":"object"},"PlaybookStatus":{"properties":{},"additionalProperties":false,"type":"object"},"PlaybookTrigger":{"properties":{"canary":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTriggerEvent"},"type":"array"},"component":{"items":{"$ref":"#/definitions/PlaybookTriggerEvent"},"type":"array"},"webhook":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTriggerWebhook"}},"additionalProperties":false,"type":"object"},"PlaybookTriggerEvent":{"required":["event"],"properties":{"event":{"type":"string"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"filter":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookTriggerWebhook":{"required":["path"],"properties":{"path":{"type":"string"},"authentication":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuth"}},"additionalProperties":false,"type":"object"},"PodAction":{"required":["name","spec"],"properties":{"name":{"type":"string"},"maxLength":{"type":"integer"},"spec":{"additionalProperties":true},"artifacts":{"items":{"$ref":"#/definitions/Artifact"},"type":"array"}},"additionalProperties":false,"type":"object"},"SQLAction":{"required":["query","driver"],"properties":{"connection":{"type":"string"},"url":{"type":"string"},"query":{"type":"string"},"driver":{"type":"string"}},"additionalProperties":false,"type":"object"},"SecretKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Time":{"properties":{},"additionalProperties":false,"type":"object"}}} \ No newline at end of file +{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Playbook","definitions":{"AWSConnection":{"properties":{"connection":{"type":"string"},"accessKey":{"$ref":"#/definitions/EnvVar"},"secretKey":{"$ref":"#/definitions/EnvVar"},"sessionToken":{"$ref":"#/definitions/EnvVar"},"region":{"type":"string"},"endpoint":{"type":"string"},"skipTLSVerify":{"type":"boolean"},"objectPath":{"type":"string"},"usePathStyle":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"Artifact":{"required":["path"],"properties":{"path":{"type":"string"}},"additionalProperties":false,"type":"object"},"AzureConnection":{"properties":{"connection":{"type":"string"},"clientID":{"$ref":"#/definitions/EnvVar"},"clientSecret":{"$ref":"#/definitions/EnvVar"},"tenantID":{"type":"string"}},"additionalProperties":false,"type":"object"},"ConfigMapKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"EnvVar":{"properties":{"name":{"type":"string"},"value":{"type":"string"},"valueFrom":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVarSource"}},"additionalProperties":false,"type":"object"},"EnvVarSource":{"properties":{"serviceAccount":{"type":"string"},"helmRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/HelmRefKeySelector"},"configMapKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ConfigMapKeySelector"},"secretKeyRef":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SecretKeySelector"}},"additionalProperties":false,"type":"object"},"ExecAction":{"required":["script"],"properties":{"script":{"type":"string"},"connections":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ExecConnections"},"artifacts":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Artifact"},"type":"array"},"env":{"items":{"$ref":"#/definitions/EnvVar"},"type":"array"},"checkout":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitCheckout"}},"additionalProperties":false,"type":"object"},"ExecConnections":{"properties":{"aws":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/AWSConnection"},"gcp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GCPConnection"},"azure":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/AzureConnection"}},"additionalProperties":false,"type":"object"},"FieldsV1":{"properties":{},"additionalProperties":false,"type":"object"},"GCPConnection":{"properties":{"connection":{"type":"string"},"endpoint":{"type":"string"},"credentials":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"GitCheckout":{"properties":{"url":{"type":"string"},"connection":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"certificate":{"$ref":"#/definitions/EnvVar"},"destination":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsAction":{"required":["repo","commit"],"properties":{"repo":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionRepo"},"commit":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionCommit"},"pr":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionPR"},"patches":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionPatch"},"type":"array"},"files":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsActionFile"},"type":"array"}},"additionalProperties":false,"type":"object"},"GitOpsActionCommit":{"required":["author","email","message"],"properties":{"author":{"type":"string"},"email":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionFile":{"required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionPR":{"required":["title"],"properties":{"title":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"GitOpsActionPatch":{"required":["path"],"properties":{"path":{"type":"string"},"yq":{"type":"string"},"jq":{"type":"string"}},"additionalProperties":false,"type":"object"},"GitOpsActionRepo":{"required":["url"],"properties":{"url":{"type":"string"},"base":{"type":"string"},"branch":{"type":"string"},"connection":{"type":"string"}},"additionalProperties":false,"type":"object"},"HTTPAction":{"properties":{"connection":{"type":"string"},"url":{"type":"string"},"username":{"$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"},"method":{"type":"string"},"ntlm":{"type":"boolean"},"ntlmv2":{"type":"boolean"},"headers":{"items":{"$ref":"#/definitions/EnvVar"},"type":"array"},"body":{"type":"string"},"templateBody":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"HelmRefKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"ManagedFieldsEntry":{"properties":{"manager":{"type":"string"},"operation":{"type":"string"},"apiVersion":{"type":"string"},"time":{"$ref":"#/definitions/Time"},"fieldsType":{"type":"string"},"fieldsV1":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/FieldsV1"},"subresource":{"type":"string"}},"additionalProperties":false,"type":"object"},"NotificationAction":{"required":["title","message"],"properties":{"url":{"type":"string"},"connection":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"ObjectMeta":{"properties":{"name":{"type":"string"},"generateName":{"type":"string"},"namespace":{"type":"string"},"selfLink":{"type":"string"},"uid":{"type":"string"},"resourceVersion":{"type":"string"},"generation":{"type":"integer"},"creationTimestamp":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Time"},"deletionTimestamp":{"$ref":"#/definitions/Time"},"deletionGracePeriodSeconds":{"type":"integer"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"annotations":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"ownerReferences":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/OwnerReference"},"type":"array"},"finalizers":{"items":{"type":"string"},"type":"array"},"managedFields":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ManagedFieldsEntry"},"type":"array"}},"additionalProperties":false,"type":"object"},"OwnerReference":{"required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"uid":{"type":"string"},"controller":{"type":"boolean"},"blockOwnerDeletion":{"type":"boolean"}},"additionalProperties":false,"type":"object"},"Permission":{"properties":{"role":{"type":"string"},"team":{"type":"string"},"ref":{"type":"string"}},"additionalProperties":false,"type":"object"},"Playbook":{"properties":{"kind":{"type":"string"},"apiVersion":{"type":"string"},"metadata":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ObjectMeta"},"spec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookSpec"},"status":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookStatus"}},"additionalProperties":false,"type":"object"},"PlaybookAction":{"required":["name"],"properties":{"name":{"type":"string"},"delay":{"type":"string"},"timeout":{"type":"string"},"exec":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/ExecAction"},"gitops":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/GitOpsAction"},"http":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/HTTPAction"},"sql":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/SQLAction"},"pod":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PodAction"},"notification":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/NotificationAction"}},"additionalProperties":false,"type":"object"},"PlaybookApproval":{"properties":{"type":{"type":"string"},"approvers":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookApprovers"}},"additionalProperties":false,"type":"object"},"PlaybookApprovers":{"properties":{"people":{"items":{"type":"string"},"type":"array"},"teams":{"items":{"type":"string"},"type":"array"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuth":{"properties":{"basic":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthBasic"},"github":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthGithub"},"svix":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthSVIX"},"jwt":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuthJWT"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthBasic":{"required":["username","password"],"properties":{"username":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/EnvVar"},"password":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthGithub":{"required":["token"],"properties":{"token":{"$ref":"#/definitions/EnvVar"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthJWT":{"required":["jwksUri"],"properties":{"jwksUri":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookEventWebhookAuthSVIX":{"required":["secret"],"properties":{"secret":{"$ref":"#/definitions/EnvVar"},"verifyTimestamp":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookParameter":{"required":["name","label"],"properties":{"name":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"icon":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"properties":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"PlaybookResourceFilter":{"properties":{"type":{"type":"string"},"tags":{"patternProperties":{".*":{"type":"string"}},"type":"object"}},"additionalProperties":false,"type":"object"},"PlaybookSpec":{"required":["actions"],"properties":{"description":{"type":"string"},"icon":{"type":"string"},"on":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTrigger"},"permissions":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/Permission"},"type":"array"},"configs":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"checks":{"items":{"$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"components":{"items":{"$ref":"#/definitions/PlaybookResourceFilter"},"type":"array"},"parameters":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookParameter"},"type":"array"},"actions":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookAction"},"type":"array"},"approval":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookApproval"}},"additionalProperties":false,"type":"object"},"PlaybookStatus":{"properties":{},"additionalProperties":false,"type":"object"},"PlaybookTrigger":{"properties":{"canary":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTriggerEvent"},"type":"array"},"component":{"items":{"$ref":"#/definitions/PlaybookTriggerEvent"},"type":"array"},"webhook":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookTriggerWebhook"}},"additionalProperties":false,"type":"object"},"PlaybookTriggerEvent":{"required":["event"],"properties":{"event":{"type":"string"},"labels":{"patternProperties":{".*":{"type":"string"}},"type":"object"},"filter":{"type":"string"}},"additionalProperties":false,"type":"object"},"PlaybookTriggerWebhook":{"required":["path"],"properties":{"path":{"type":"string"},"authentication":{"$schema":"http://json-schema.org/draft-04/schema#","$ref":"#/definitions/PlaybookEventWebhookAuth"}},"additionalProperties":false,"type":"object"},"PodAction":{"required":["name","spec"],"properties":{"name":{"type":"string"},"maxLength":{"type":"integer"},"spec":{"additionalProperties":true},"artifacts":{"items":{"$ref":"#/definitions/Artifact"},"type":"array"}},"additionalProperties":false,"type":"object"},"SQLAction":{"required":["query","driver"],"properties":{"connection":{"type":"string"},"url":{"type":"string"},"query":{"type":"string"},"driver":{"type":"string"}},"additionalProperties":false,"type":"object"},"SecretKeySelector":{"required":["key"],"properties":{"name":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false,"type":"object"},"Time":{"properties":{},"additionalProperties":false,"type":"object"}}} \ No newline at end of file diff --git a/playbook/webhook_test.go b/playbook/webhook_test.go index 4246b79b9..0c5226882 100644 --- a/playbook/webhook_test.go +++ b/playbook/webhook_test.go @@ -171,7 +171,7 @@ func Test_authenticateWebhook(t *testing.T) { }, auth: &v1.PlaybookEventWebhookAuth{ JWT: &v1.PlaybookEventWebhookAuthJWT{ - JWKSURI: "https://raw.githubusercontent.com/MicahParks/keyfunc/master/example_jwks.json", + JWKSURI: "https://raw.githubusercontent.com/MicahParks/keyfunc/ab22bfcd9495ed15e4b341c8490a296231ee1be1/example_jwks.json", }, }, },