@@ -6,14 +6,14 @@ alphaVersion: 2.0
6
6
---
7
7
8
8
This guide shows how to use Crossplane Operations to automate day-two
9
- operational tasks. You create an Operation that checks SSL certificate
9
+ operational tasks. You create an ` Operation ` that checks SSL certificate
10
10
expiry for a website.
11
11
12
12
** Crossplane calls this _ Operations_ .** Operations run function pipelines to
13
13
perform tasks that don't fit the typical resource creation pattern - like
14
14
certificate monitoring, rolling upgrades, or scheduled maintenance.
15
15
16
- An Operation looks like this:
16
+ An ` Operation ` looks like this:
17
17
18
18
``` yaml
19
19
apiVersion : ops.crossplane.io/v1alpha1
@@ -60,15 +60,15 @@ spec:
60
60
` ` `
61
61
62
62
<!-- vale Crossplane.Spelling = NO -->
63
- **The Operation runs once to completion, like a Kubernetes Job.**
63
+ **The ` Operation` runs once to completion, like a Kubernetes ` Job` .**
64
64
<!-- vale Crossplane.Spelling = YES -->
65
65
66
- When you create the Operation, Crossplane runs the function pipeline. The
66
+ When you create the ` Operation` , Crossplane runs the function pipeline. The
67
67
function checks SSL certificate expiry for google.com and returns the results
68
68
in the operation's output.
69
69
70
70
This basic example shows the concept. In the walkthrough below, you create
71
- a more realistic Operation that reads Kubernetes Ingress resources and
71
+ a more realistic ` Operation` that reads Kubernetes ` Ingress` resources and
72
72
annotates them with certificate expiry information for monitoring tools.
73
73
74
74
# # Prerequisites
@@ -91,17 +91,17 @@ helm upgrade --install crossplane crossplane-stable/crossplane \
91
91
92
92
# # Create an operation
93
93
94
- Follow these steps to create your first Operation :
94
+ Follow these steps to create your first ` Operation` :
95
95
96
96
1. [Create a sample Ingress](#create-a-sample-ingress) for certificate checking
97
97
1. [Install the function](#install-the-function) you want to use for the
98
98
operation
99
- 1. [Create the Operation](#create-the-operation) that checks the Ingress
99
+ 1. [Create the Operation](#create-the-operation) that checks the ` Ingress`
100
100
1. [Check the Operation](#check-the-operation) as it runs
101
101
102
102
# ## Create a sample Ingress
103
103
104
- Create an Ingress that references a real hostname but doesn't route actual
104
+ Create an ` Ingress` that references a real hostname but doesn't route actual
105
105
traffic :
106
106
107
107
` ` ` yaml
@@ -132,8 +132,8 @@ kubectl apply -f ingress.yaml
132
132
133
133
# ## Grant Ingress permissions
134
134
135
- Operations need permission to access and change Ingresses. Create a ClusterRole
136
- that grants Crossplane access to Ingresses :
135
+ ` Operations` need permission to access and change ` Ingresses` . Create a ` ClusterRole`
136
+ that grants Crossplane access to ` Ingresses` :
137
137
138
138
` ` ` yaml
139
139
apiVersion: rbac.authorization.k8s.io/v1
@@ -186,7 +186,7 @@ crossplane-contrib-function-python True True xpkg.crossplane.io/cr
186
186
187
187
# ## Create the operation
188
188
189
- Create this Operation that monitors the Ingress certificate :
189
+ Create this ` Operation` that monitors the ` Ingress` certificate :
190
190
191
191
` ` ` yaml
192
192
apiVersion: ops.crossplane.io/v1alpha1
@@ -275,7 +275,7 @@ kubectl apply -f operation.yaml
275
275
276
276
# ## Check the operation
277
277
278
- Check that the Operation runs successfully :
278
+ Check that the ` Operation` runs successfully :
279
279
280
280
` ` ` shell {copy-lines="1"}
281
281
kubectl get -f operation.yaml
@@ -284,10 +284,10 @@ ingress-cert-monitor True True 15s
284
284
` ` `
285
285
286
286
{{<hint "tip">}}
287
- Operations show `SUCCEEDED=True` when they complete successfully.
287
+ ` Operations` show `SUCCEEDED=True` when they complete successfully.
288
288
{{</hint>}}
289
289
290
- Check the Operation's detailed status :
290
+ Check the ` Operation` 's detailed status :
291
291
292
292
` ` ` shell {copy-lines="1"}
293
293
kubectl describe operation ingress-cert-monitor
@@ -317,7 +317,7 @@ The `status.pipeline` field shows the output returned by each function step.
317
317
Use this field for tracking what the operation accomplished.
318
318
{{</hint>}}
319
319
320
- Check that the Operation annotated the Ingress with certificate information :
320
+ Check that the ` Operation` annotated the ` Ingress` with certificate information :
321
321
322
322
` ` ` shell {copy-lines="1"}
323
323
kubectl get ingress example-app -o yaml
@@ -335,8 +335,8 @@ spec:
335
335
` ` `
336
336
337
337
{{<hint "tip">}}
338
- This pattern shows how Operations can both read and change existing Kubernetes
339
- resources. The Operation annotated the Ingress with certificate expiry
338
+ This pattern shows how ` Operations` can both read and change existing Kubernetes
339
+ resources. The ` Operation` annotated the ` Ingress` with certificate expiry
340
340
information that other tools can use for monitoring and alerting.
341
341
{{</hint>}}
342
342
@@ -353,14 +353,14 @@ kubectl delete -f function.yaml
353
353
354
354
# # Next steps
355
355
356
- Operations are powerful building blocks for operational workflows. Learn more
356
+ ` Operations` are powerful building blocks for operational workflows. Learn more
357
357
about :
358
358
359
- * [**Operation concepts**]({{<ref "../operations/operation">}}) - Core
360
- Operation features and best practices
361
- * [**CronOperation**]({{<ref "../operations/cronoperation">}}) - Schedule
359
+ * [**` Operation` concepts**]({{<ref "../operations/operation">}}) - Core
360
+ ` Operation` features and best practices
361
+ * [**` CronOperation` **]({{<ref "../operations/cronoperation">}}) - Schedule
362
362
operations to run automatically
363
- * [**WatchOperation**]({{<ref "../operations/watchoperation">}}) - Trigger
363
+ * [**` WatchOperation` **]({{<ref "../operations/watchoperation">}}) - Trigger
364
364
operations when resources change
365
365
366
366
Explore the complete [Operations documentation]({{<ref "../operations">}}) for
0 commit comments