Skip to content

Commit

Permalink
chore: fix playbook context syntax (#265)
Browse files Browse the repository at this point in the history
* chore: fix playbook context syntax

* Update mission-control/docs/reference/playbooks/context.mdx

---------

Co-authored-by: Moshe Immerman <[email protected]>
  • Loading branch information
yashmehrotra and moshloop authored Sep 3, 2024
1 parent 1fddf7f commit 4910001
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
19 changes: 14 additions & 5 deletions mission-control/docs/reference/playbooks/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ Playbook actions can be selectively executed based on CEL expressions. These exp

<details summary="Defaulting Parameters">
<div>
```yaml title="delete-kubernetes-pod.yaml" apiVersion:
mission-control.flanksource.com/v1 kind: Playbook metadata: name: edit spec:
title: 'Edit Kustomize Resource' icon: flux parameters: //highligh-next-line
- default: 'chore: update $(.config.type)/$(.config.name)' name:
commit_message ```
```yaml title="delete-kubernetes-pod.yaml"
apiVersion:

Check failure on line 49 in mission-control/docs/reference/playbooks/context.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/context.mdx#L49

[Flanksource.Spelling] Is 'apiVersion' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'apiVersion' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/context.mdx", "range": {"start": {"line": 49, "column": 5}}}, "severity": "ERROR"}
mission-control.flanksource.com/v1
kind: Playbook
metadata:
name: edit
spec:
title: 'Edit Kustomize Resource'

Check failure on line 55 in mission-control/docs/reference/playbooks/context.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/context.mdx#L55

[Flanksource.Spelling] Is 'Kustomize' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'Kustomize' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/context.mdx", "range": {"start": {"line": 55, "column": 22}}}, "severity": "ERROR"}
icon: flux
parameters:
//highlight-next-line
- default: 'chore: update $(.config.type)/$(.config.name)'
name: commit_message

Check failure on line 60 in mission-control/docs/reference/playbooks/context.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/context.mdx#L60

[Flanksource.Spelling] Is 'commit_message' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'commit_message' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/context.mdx", "range": {"start": {"line": 60, "column": 17}}}, "severity": "ERROR"}
```
</div>
</details>
Expand Down
2 changes: 1 addition & 1 deletion modules/canary-checker
Submodule canary-checker updated 58 files
+5 −0 .github/dependabot.yml
+1 −1 .github/workflows/lint.yml
+4 −0 .golangci.yml
+5 −10 Makefile
+5 −20 api/context/context.go
+0 −10 api/v1/checks.go
+0 −1 api/v1/common.go
+0 −1 canary-checker.properties
+0 −15 chart/templates/clusterrole.yaml
+12 −0 chart/templates/clusterrolebinding.yaml
+1 −13 chart/templates/deployment.yaml
+3 −26 chart/values.yaml
+2 −2 checks/exec.go
+10 −2 checks/folder_sftp.go
+10 −2 checks/folder_smb.go
+17 −51 checks/http.go
+1 −2 checks/jmeter.go
+24 −5 checks/kubernetes.go
+34 −12 checks/kubernetes_resource.go
+3 −20 checks/runchecks.go
+0 −2 checks/s3.go
+1 −1 checks/sql.go
+1 −2 checks/tcp.go
+1 −1 cmd/docs.go
+8 −10 cmd/offline.go
+23 −19 cmd/operator.go
+45 −19 cmd/root.go
+5 −14 cmd/run.go
+7 −4 cmd/serve.go
+4 −6 cmd/topology.go
+1 −0 config/canary-dev.yaml
+3 −14 config/deploy/crd.yaml
+3 −14 config/deploy/manifests.yaml
+10 −28 config/schemas/canary.schema.json
+10 −28 config/schemas/component.schema.json
+0 −3 config/schemas/health_awsconfig.schema.json
+0 −3 config/schemas/health_awsconfigrule.schema.json
+0 −3 config/schemas/health_cloudwatch.schema.json
+0 −3 config/schemas/health_exec.schema.json
+10 −13 config/schemas/health_folder.schema.json
+0 −3 config/schemas/health_s3.schema.json
+10 −28 config/schemas/topology.schema.json
+0 −3 fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml
+47 −67 go.mod
+90 −133 go.sum
+225 −0 hack/generate-schemas/go.mod
+2,135 −0 hack/generate-schemas/go.sum
+7 −1 main.go
+0 −25 pkg/api.go
+2 −9 pkg/db/canary.go
+157 −0 pkg/db/init.go
+36 −0 pkg/db/postgrest.go
+253 −0 pkg/kube.go
+0 −9 pkg/results.go
+4 −19 pkg/runner/runner.go
+0 −98 pkg/runner/runner_test.go
+0 −1 pkg/system_api.go
+6 −4 test/run_test.go
2 changes: 1 addition & 1 deletion modules/config-db
Submodule config-db updated 54 files
+5 −0 .github/dependabot.yml
+0 −2 .github/workflows/lint.yml
+3 −8 .gitignore
+8 −14 Makefile
+18 −44 api/cache.go
+6 −27 api/context.go
+0 −2 api/global.go
+0 −60 api/v1/scrapeconfig_types.go
+2 −42 api/v1/types.go
+1 −1 api/v1/zz_generated.deepcopy.go
+0 −8 chart/crds/configs.flanksource.com_scrapeconfigs.yaml
+2 −2 cmd/offline.go
+28 −12 cmd/operator.go
+51 −13 cmd/root.go
+15 −86 cmd/run.go
+72 −29 cmd/server.go
+3 −9 config/schemas/scrape_config.schema.json
+18 −18 db/changes.go
+1 −1 db/config_scraper.go
+0 −105 db/diff.go
+141 −0 db/init.go
+2 −7 db/models/config_change.go
+0 −11 db/models/config_item.go
+47 −0 db/postgrest.go
+1 −1 db/testdata/person-new.json
+15 −15 db/testdata/person.diff
+1 −7 db/testdata/simple-new.json
+2 −7 db/testdata/simple-old.json
+4 −11 db/testdata/simple.diff
+50 −183 db/update.go
+11 −100 db/update_test.go
+20 −0 db/utils.go
+0 −16 fixtures/data/echo-playbook.yaml
+0 −12 fixtures/file-crd-sync.yaml
+49 −67 go.mod
+88 −218 go.sum
+0 −2 hack/generate-schemas/.gitignore
+224 −0 hack/generate-schemas/go.mod
+2,140 −0 hack/generate-schemas/go.sum
+7 −61 scrapers/cron.go
+41 −9 scrapers/kubernetes/events_watch.go
+7 −14 scrapers/kubernetes/informers.go
+10 −7 scrapers/kubernetes/kubernetes.go
+10 −4 scrapers/kubernetes/kubernetes_file.go
+1 −1 scrapers/processors/json.go
+2 −2 scrapers/run.go
+1 −1 scrapers/runscrapers.go
+14 −49 scrapers/runscrapers_test.go
+1 −1 scrapers/slack/slack.go
+0 −1 testdata/.gitignore
+58 −0 utils/kube/exec.go
+242 −0 utils/kube/kube.go
+35 −0 utils/kube/kube_test.go
+58 −0 utils/memory.go
2 changes: 1 addition & 1 deletion modules/duty
Submodule duty updated 55 files
+3 −1 .github/workflows/lint.yml
+1 −1 .github/workflows/test.yaml
+0 −3 .gitignore
+1 −12 Makefile
+7 −32 api/config.go
+0 −13 cache/cache.go
+5 −83 connection/aws.go
+0 −1 connection/connection.go
+0 −16 connection/s3.go
+16 −47 connection/sftp.go
+21 −47 connection/smb.go
+0 −4 context/accessors.go
+10 −60 context/context.go
+24 −52 context/envvar.go
+3 −3 context/properties.go
+5 −11 db.go
+7 −29 echo/debug.go
+29 −0 envvar.go
+0 −50 functions/pre_alter_columns.sql
+33 −55 go.mod
+67 −146 go.sum
+0 −2 hack/migrate/.gitignore
+203 −0 hack/migrate/go.mod
+2,374 −0 hack/migrate/go.sum
+0 −1 hack/migrate/main.go
+30 −87 job/job.go
+1 −1 job/job_test.go
+0 −191 kubernetes/dynamic.go
+30 −117 kubernetes/k8s.go
+0 −139 leader/election.go
+1 −1 models/canary.go
+0 −4 models/components.go
+2 −2 models/config.go
+0 −8 models/connections.go
+0 −2 models/notifications.go
+12 −3 models/playbooks.go
+0 −1 models/source.go
+1 −1 models/topology.go
+0 −9 postgrest/postgrest.go
+5 −6 schema/config.hcl
+0 −9 schema/notifications.hcl
+1 −1 schema/vars.hcl
+0 −42 shutdown/shutdown.go
+13 −127 start.go
+0 −1 tests/job_test.go
+22 −11 tests/setup/common.go
+1 −1 tests/upstream_test.go
+0 −62 upstream/agent_status_ring.go
+27 −42 upstream/controllers.go
+3 −18 views/006_config_views.sql
+0 −1 views/010_topology.sql
+0 −1 views/018_playbooks.sql
+0 −1 views/031_casbin_effect.sql
+1 −0 views/031_truncate_casbin.sql
+1 −0 views/032_playbook_nulls.sql

0 comments on commit 4910001

Please sign in to comment.