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

add oam default labels for trait #197

Merged
merged 1 commit into from
Sep 7, 2020
Merged

Conversation

wonderflow
Copy link
Member

@wonderflow wonderflow commented Sep 4, 2020

Along with PR #189

Add following labels as default OAM labels for all OAM workloads and traits.

metadata:
  labels:
    app.oam.dev/name: myapp
    app.oam.dev/component: mycomp
    app.oam.dev/revision: mycomp-v1

pkg/controller/v1alpha2/applicationconfiguration/render.go Outdated Show resolved Hide resolved
@@ -147,12 +148,13 @@ func (r *components) renderComponent(ctx context.Context, acc v1alpha2.Applicati

traits := make([]*Trait, 0, len(acc.Traits))
traitDefs := make([]v1alpha2.TraitDefinition, 0, len(acc.Traits))
compInfoLabels[oam.LabelOAMConceptType] = oam.ConceptTrait
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a fan of reuse the map like this but I know it's tempting.

pkg/oam/labels.go Outdated Show resolved Hide resolved
pkg/oam/labels.go Outdated Show resolved Hide resolved
pkg/oam/labels.go Outdated Show resolved Hide resolved
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
@wonderflow wonderflow merged commit 366b88f into crossplane:master Sep 7, 2020
@wonderflow wonderflow deleted the labels branch September 7, 2020 08:24
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