Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Workload Labeling Proposal #200

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

zzxwill
Copy link
Member

@zzxwill zzxwill commented Sep 7, 2020

to recommend a simple way - Workload Labeling, to easily
establish connections between Workloads, Components,
AppConfigurations, and pods.

Signed-off-by: Zheng Xi Zhou [email protected]

@zzxwill
Copy link
Member Author

zzxwill commented Sep 7, 2020

@wonderflow I doubt whether there is a more 'strict' way for an OAM user to set the label definition.oam.dev/unique-pod after checking the corresponding WorkloadDefinition, as I think he/she might forget the label.
Besides, the one who prepares WorkloadDefinition might not know the which label pod-template-hash/controller-revision-hash will be generated for the Pod by the workload.

design/workload-labeling.md Outdated Show resolved Hide resolved
design/workload-labeling.md Outdated Show resolved Hide resolved

## Proposal

Step 1: Setting the label `definition.oam.dev/unique-pod` as the unique identifier of pods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we create a new field in workloadDefinition.spec instead of using a label.


- For OAM users

We recommend you to set label `definition.oam.dev/unique-pod` in WorkloadDefinition and Component.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkloadDefinition is created by Platform builder


## Best practice

- For OAM users
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like using OAM users here, it can't be understood clearly.

We general distinguish users by

  • Platform builder
  • Application Operator
  • Application Developer

@wonderflow
Copy link
Member

@wonderflow I doubt whether there is a more 'strict' way for an OAM user to set the label definition.oam.dev/unique-pod after checking the corresponding WorkloadDefinition, as I think he/she might forget the label.
Besides, the one who prepares WorkloadDefinition might not know the which label pod-template-hash/controller-revision-hash will be generated for the Pod by the workload.

What do you mean by saying OAM user here? If I understood you clearly, you may mean platform builder here? A platform builder won't forget anything if they are building service for their users.

wonderflow and others added 3 commits September 10, 2020 11:52
* fix workload status for multiple revision case

Signed-off-by: 天元 <[email protected]>

* add CurrentWorkingRevision flag in workload status

Signed-off-by: 天元 <[email protected]>
Signed-off-by: zzxwill <[email protected]>
to recommend a simple way - Workload Labeling, to easily
establish connections between Workloads, Components,
AppConfigurations, and pods.

Signed-off-by: zzxwill <[email protected]>
update the design per the change of unique label crossplane#203
and address comments.

Signed-off-by: 天元 <[email protected]>
Signed-off-by: zzxwill <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants