mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
implement appfile oriented OAM Application run
This commit is contained in:
+10
-2
@@ -107,11 +107,19 @@ func GetTraitApiVersionKind(ctx context.Context, c client.Client, namespace stri
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
apiVersion := t.Annotations["oam.appengine.info/apiVersion"]
|
||||
kind := t.Annotations["oam.appengine.info/kind"]
|
||||
apiVersion := t.Annotations[types.AnnApiVersion]
|
||||
kind := t.Annotations[types.AnnKind]
|
||||
return apiVersion, kind, nil
|
||||
}
|
||||
|
||||
func GetApiVersionKindFromTrait(td corev1alpha2.TraitDefinition) (string, string) {
|
||||
return td.Annotations[types.AnnApiVersion], td.Annotations[types.AnnKind]
|
||||
}
|
||||
|
||||
func GetApiVersionKindFromWorkload(td corev1alpha2.WorkloadDefinition) (string, string) {
|
||||
return td.Annotations[types.AnnApiVersion], td.Annotations[types.AnnKind]
|
||||
}
|
||||
|
||||
func GetWorkloadNameAliasKind(ctx context.Context, c client.Client, namespace string, workloadName string) (string, string, string) {
|
||||
var name, alias, kind string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user