Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of labels and annotations in pod template examples #5025

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions docs/deployment/configuration/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ An example PodTemplate is shown:
template:
metadata:
labels:
- foo
foo: from-pod-template
annotations:
- foo: initial-value
- bar: initial-value
foo: initial-value
bar: initial-value
spec:
containers:
- name: default
Expand All @@ -221,10 +221,10 @@ Pod Labels, Annotations, and enables the host networking.
plugins:
k8s:
default-labels:
- bar
bar: from-default-label
default-annotations:
- foo: overridden-value
- baz: non-overridden-value
foo: overridden-value
baz: non-overridden-value
enable-host-networking-pod: true

To construct a Pod, FlytePropeller initializes a Pod definition using the default
Expand All @@ -241,12 +241,12 @@ The resultant Pod using the above default PodTemplate and K8s Plugin configurati
name: example-pod
namespace: flytesnacks-development
labels:
- foo # maintained initial value
- bar # value appended by k8s plugin configuration
foo: from-pod-template # maintained initial value
bar: from-default-label # value appended by k8s plugin configuration
annotations:
- foo: overridden-value # value overridden by k8s plugin configuration
- bar: initial-value # maintained initial value
- baz: non-overridden-value # value added by k8s plugin configuration
foo: overridden-value # value overridden by k8s plugin configuration
bar: initial-value # maintained initial value
baz: non-overridden-value # value added by k8s plugin configuration
spec:
containers:
- name: ax9kd5xb4p8r45bpdv7v-n0-0
Expand Down Expand Up @@ -280,8 +280,8 @@ of the task. For example:
template:
metadata:
annotations:
- annotation_1: initial-value
- bar: initial-value
annotation_1: initial-value
bar: initial-value
spec:
containers:
- name: default
Expand Down Expand Up @@ -328,12 +328,12 @@ The resultant Pod is as follows:
name: example-pod
namespace: flytesnacks-development
labels:
- label_1: value-1 # from Compile-time value
- label_2: value-2 # from Compile-time value
label_1: value-1 # from Compile-time value
label_2: value-2 # from Compile-time value
annotations:
- annotation_1: value-1 # value overridden by Compile-time PodTemplate
- annotation_2: value-2 # from Compile-time PodTemplate
- bar: initial-value # from Runtime PodTemplate
annotation_1: value-1 # value overridden by Compile-time PodTemplate
annotation_2: value-2 # from Compile-time PodTemplate
bar: initial-value # from Runtime PodTemplate
spec:
containers:
- name: default
Expand Down Expand Up @@ -398,12 +398,12 @@ And a Runtime PodTemplate:
template:
metadata:
labels:
- label_1: value-runtime
- label_2: value-runtime
- label_3: value-runtime
label_1: value-runtime
label_2: value-runtime
label_3: value-runtime
annotations:
- foo: value-runtime
- bar: value-runtime
foo: value-runtime
bar: value-runtime
spec:
containers:
- name: default
Expand All @@ -418,10 +418,10 @@ And the following K8s Plugin Configuration:
plugins:
k8s:
default-labels:
- label_1: value-plugin
label_1: value-plugin
default-annotations:
- annotation_1: value-plugin
- baz: value-plugin
annotation_1: value-plugin
baz: value-plugin

The resultant pod for that task is as follows:

Expand All @@ -433,14 +433,14 @@ The resultant pod for that task is as follows:
name: example-pod
namespace: flytesnacks-development
labels:
- label_1: value-plugin
- label_2: value-compile
label_1: value-plugin
label_2: value-compile
annotations:
- annotation_1: value-plugin
- annotation_2: value-compile
- foo: value-runtime
- bar: value-runtime
- baz: value-plugin
annotation_1: value-plugin
annotation_2: value-compile
foo: value-runtime
bar: value-runtime
baz: value-plugin
spec:
containers:
- name: default
Expand Down
Loading