-
Notifications
You must be signed in to change notification settings - Fork 1
Kubernetes Object Metadata
Gregory Nickonov edited this page Mar 4, 2019
·
2 revisions
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| annotations | annotations | String key to String value map |
| finalizers | finalizers | Array of String |
| labels | labels | String key to String value map |
| name | name | String |
| namespace | namespace | String |
Manipulates the labels map:
R.deployment :frontend do
metadata do
# Add single label with key 'color' and value 'blue'
label color: 'blue'
# Add two labels in one call
labels feature: :frontend,
component: :site
end
endManipulates the annotations map:
R.deployment :frontend do
# Add single annotation with key 'color' and value 'blue'
metadata.annotation 'prometheus.io/scrape': 'true'
# Add two labels in one call
metadata.annotations 'services.example.org/red-blue': :red,
'services.example.org/weight': 100
endManipulates the finalizers array:
R.deployment :frontend do
metadata.finalizers 'finalizer-one', 'finalizer-two'
metadata do
finalizer 'another-finalizer'
end
end