implement appfile oriented OAM Application run

This commit is contained in:
天元
2020-08-13 14:13:22 +08:00
parent 30516c98b5
commit 9ea02adf2f
22 changed files with 599 additions and 335 deletions
+10 -2
View File
@@ -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