Skip to content

Commit 497f6c0

Browse files
authored
chore: Adding docs for probe best practices and future roadmap (#269)
* chore: Adding docs for probe best practices and future roadmap * chore: Updating spelling * chore: Addressing review comments * chore: Syncing sidebar js with master
1 parent 906a186 commit 497f6c0

File tree

3 files changed

+104
-73
lines changed

3 files changed

+104
-73
lines changed

website/docs/best-practices.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
id: best-practices
3+
title: Best Practices
4+
sidebar_label: Best Practices
5+
---
6+
7+
---
8+
9+
## Probes
10+
11+
#### Restrict execution scope
12+
13+
- In the case where a malicious, privileged user (who doesn't have cluster access) tries to extract the SA token from the probe pod and leverages it for destructive action, the recommended way to prevent it would be to have a reduced scope within the service account itself i.e. create an RBAC without loopholes.
14+
15+
The RBAC for the agent itself can be subject to scrutiny before deployment, it can be restricted to a namespace with verbs against restricted resources, etc. The agent setup can be performed using Helm too, with changes to templates undergoing review.
16+
17+
The intent of the command probe pod is to allow the users to perform custom checks which allow them to either (a) validate the impact of chaos, either within or outside the cluster (b) manually trigger remediation or (c) perform tasks that complement the chaos itself (such as load etc.,).
18+
19+
Having a restrictive scope for this feature would depend on what kind of tasks are allowed by the cluster/devops admins within the purview of (a), (b), (c) - rather than being imposed from within the product by default. If some of the validations involve performing kube-api calls, we would need to support that / binding the admin's decision.
20+
21+
- Only users with **Executor** roles can carry out executing probes. Project **Owners**, however, wield the authority to create, edit, and execute probes, shaping them to suit project needs and objectives. This division ensures efficient probe management, with the Executors handling execution and the project Owners overseeing customization and design.
22+
23+
#### Future Roadmap
24+
25+
- Resilience probes addition and execution are to be supported via ChaosHub and is also expected to have preset templates. The change entails probes being introduced as first class citizens/resources within the platform that can be reused across experiments via Hub. In this context, the ability to create and modify experiments/probes can be provided to a owner persona, with the probes being maintained in a Git repository (with its introduction in ChaosHub), which is also expected to have the right number of approvals for use. These are then executed as is by the executor persona on the platform.
26+
27+
- Adding a command scanner to restrict malicious linux commands/attacks used against cmdProbes via enhanced checks. Integrate the command scanner into the CREATE and UPDATE APIs of cmdProbes ensures that all commands passed through these interfaces are subjected to thorough scrutiny. This involves modifying the API endpoints to include the command scanning functionality and implementing appropriate validation logic.

website/docs/concepts/probes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ probe:
112112

113113
> `source.hostNetwork` can be set to `true` to allow access to the node network namespace for the pod executing the probe
114114

115+
For insights into efficient chaos probe practices and our roadmap for the future, check out the [best practices](../best-practices.md#probes).
116+
115117
### k8sProbe
116118

117119
With the proliferation of custom resources & operators, especially in the case of stateful applications, the steady-state is manifested as status parameters/flags within Kubernetes resources. k8sProbe addresses verification of the desired resource state by allowing users to define the Kubernetes GVR (group-version-resource) with appropriate filters (field selectors/label selectors). The fault makes use of the Kubernetes Dynamic Client to achieve this.The `k8sProbe` can be defined at `.spec.experiments[].spec.probe` the path inside ChaosEngine.

website/sidebars.js

Lines changed: 75 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,120 @@
11
module.exports = {
2-
"docs": [
2+
docs: [
33
{
4-
"Introduction": ["introduction/what-is-litmus", "introduction/features", "introduction/usage", "introduction/core-principles", "introduction/community", "introduction/other-links"]
4+
Introduction: [
5+
'introduction/what-is-litmus',
6+
'introduction/features',
7+
'introduction/usage',
8+
'introduction/core-principles',
9+
'introduction/community',
10+
'introduction/other-links'
11+
]
512
},
613
{
7-
"Getting Started": [
8-
"getting-started/resources",
9-
"getting-started/installation",
10-
]
14+
'Getting Started': ['getting-started/resources', 'getting-started/installation']
1115
},
1216
{
13-
"Architecture": [
14-
"architecture/overview",
15-
"architecture/architecture-summary",
16-
"architecture/chaos-control-plane",
17-
"architecture/chaos-execution-plane",
18-
"architecture/chaos-fault-flow"
17+
Architecture: [
18+
'architecture/overview',
19+
'architecture/architecture-summary',
20+
'architecture/chaos-control-plane',
21+
'architecture/chaos-execution-plane',
22+
'architecture/chaos-fault-flow'
1923
]
2024
},
2125
{
22-
"Concepts": [
23-
"concepts/overview",
24-
"concepts/chaos-infrastructure",
25-
"concepts/chaoshub",
26-
"concepts/chaos-workflow",
27-
"concepts/probes",
28-
"concepts/user-management",
29-
"concepts/projects",
30-
"concepts/teaming",
31-
"concepts/gitops",
32-
"concepts/oauth-dex-concept"
26+
Concepts: [
27+
'concepts/overview',
28+
'concepts/chaos-infrastructure',
29+
'concepts/chaoshub',
30+
'concepts/chaos-workflow',
31+
'concepts/probes',
32+
'concepts/user-management',
33+
'concepts/projects',
34+
'concepts/teaming',
35+
'concepts/gitops',
36+
'concepts/oauth-dex-concept'
3337
]
3438
},
3539
{
36-
"User Guides": [
37-
"user-guides/overview",
40+
'User Guides': [
41+
'user-guides/overview',
3842
{
39-
"Advanced Installation": [
43+
'Advanced Installation': [
4044
{
41-
"ChaosCenter": [
42-
"user-guides/chaoscenter-oauth-dex-installation",
43-
"user-guides/chaoscenter-advanced-installation",
44-
"user-guides/setup-without-ingress",
45-
"user-guides/setup-with-ingress"
45+
ChaosCenter: [
46+
'user-guides/chaoscenter-oauth-dex-installation',
47+
'user-guides/chaoscenter-advanced-installation',
48+
'user-guides/setup-without-ingress',
49+
'user-guides/setup-with-ingress'
4650
]
4751
},
48-
"user-guides/chaos-infrastructure-installation"
52+
'user-guides/chaos-infrastructure-installation'
4953
]
5054
},
5155
{
52-
"Environments": [
53-
"user-guides/create-environment",
54-
"user-guides/edit-environment",
55-
"user-guides/delete-environment",
56+
Environments: [
57+
'user-guides/create-environment',
58+
'user-guides/edit-environment',
59+
'user-guides/delete-environment'
5660
]
5761
},
5862
{
59-
"Chaos Infrastructure": [
60-
"user-guides/create-infrastructure",
61-
"user-guides/delete-infrastructure",
62-
]
63+
'Chaos Infrastructure': ['user-guides/create-infrastructure', 'user-guides/delete-infrastructure']
6364
},
6465
{
65-
"Injecting Fault": [
66-
"user-guides/schedule-experiment",
67-
"user-guides/observe-experiment",
68-
"user-guides/edit-schedule",
69-
"user-guides/download-experiment-manifest",
70-
"user-guides/re-run-experiment",
71-
"user-guides/delete-experiment",
72-
"user-guides/construct-experiment"
66+
'Injecting Fault': [
67+
'user-guides/schedule-experiment',
68+
'user-guides/observe-experiment',
69+
'user-guides/edit-schedule',
70+
'user-guides/download-experiment-manifest',
71+
'user-guides/re-run-experiment',
72+
'user-guides/delete-experiment',
73+
'user-guides/construct-experiment'
7374
]
7475
},
7576
{
76-
"Resilience Probes": [
77-
"user-guides/create-resilience-probe",
78-
"user-guides/delete-resilience-probe",
79-
"user-guides/edit-resilience-probe",
80-
"user-guides/view-resilience-probe"
77+
'Resilience Probes': [
78+
'user-guides/create-resilience-probe',
79+
'user-guides/delete-resilience-probe',
80+
'user-guides/edit-resilience-probe',
81+
'user-guides/view-resilience-probe'
8182
]
8283
},
83-
"user-guides/account-settings",
84+
'user-guides/account-settings',
8485
{
85-
"User Management": [
86-
"user-guides/create-user",
87-
"user-guides/view-user",
88-
"user-guides/reset-password",
89-
"user-guides/deactivate-user"
86+
'User Management': [
87+
'user-guides/create-user',
88+
'user-guides/view-user',
89+
'user-guides/reset-password',
90+
'user-guides/deactivate-user'
9091
]
9192
},
9293
{
93-
"Managing Projects": ["user-guides/change-project-name", "user-guides/leave-project"]
94+
'Managing Projects': ['user-guides/change-project-name', 'user-guides/leave-project']
9495
},
9596
{
96-
"Teaming": [
97-
"user-guides/invite-team-member",
98-
"user-guides/edit-invite",
99-
"user-guides/accept-invite",
100-
"user-guides/remove-team-member"
97+
Teaming: [
98+
'user-guides/invite-team-member',
99+
'user-guides/edit-invite',
100+
'user-guides/accept-invite',
101+
'user-guides/remove-team-member'
101102
]
102103
},
103-
"user-guides/gitops-configuration",
104-
"user-guides/image-registry",
105-
"user-guides/uninstall-litmus"
104+
'user-guides/gitops-configuration',
105+
'user-guides/image-registry',
106+
'user-guides/uninstall-litmus'
106107
]
107108
},
108109
{
109-
"Litmusctl": ["litmusctl/installation", "litmusctl/litmusctl-usage"]
110+
Litmusctl: ['litmusctl/installation', 'litmusctl/litmusctl-usage']
110111
},
111112
{
112-
"Integrations": ["integrations/prometheus", "integrations/grafana", "integrations/backstage"]
113+
Integrations: ['integrations/prometheus', 'integrations/grafana', 'integrations/backstage']
113114
},
114-
"troubleshooting",
115-
"glossary",
116-
"faq"
115+
'troubleshooting',
116+
'best-practices',
117+
'glossary',
118+
'faq'
117119
]
118120
}

0 commit comments

Comments
 (0)