Fix: remove useless envbinding crd (#3379)

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
Somefive
2022-03-08 13:40:05 +08:00
committed by GitHub
parent 751aed0098
commit aeaa199982
3 changed files with 2 additions and 122 deletions
@@ -1,62 +0,0 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/env-binding.cue
apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Provides differentiated configuration and environment scheduling policies for application.
name: env-binding
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
output: {
apiVersion: "core.oam.dev/v1alpha1"
kind: "EnvBinding"
spec: {
engine: parameter.clusterManagementEngine
appTemplate: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: context.appName
namespace: context.namespace
}
spec: components: context.components
}
envs: parameter.envs
outputResourcesTo: {
name: context.name
namespace: context.namespace
}
}
}
#Env: {
name: string
patch: components: [...{
name: string
type: string
properties: {...}
traits?: [...{
type: string
properties: {...}
}]
}]
placement: {
clusterSelector?: {
labels?: [string]: string
name?: string
}
namespaceSelector?: {
labels?: [string]: string
name?: string
}
}
selector?: components: [...string]
}
parameter: {
clusterManagementEngine: *"cluster-gateway" | string
envs: [...#Env]
}
+2
View File
@@ -271,6 +271,8 @@ func (p *Parser) parsePolicies(ctx context.Context, af *Appfile) error {
w, err = p.makeBuiltInPolicy(policy.Name, policy.Type, policy.Properties)
case v1alpha1.ApplyOncePolicyType:
w, err = p.makeBuiltInPolicy(policy.Name, policy.Type, policy.Properties)
case v1alpha1.EnvBindingPolicyType:
w, err = p.makeBuiltInPolicy(policy.Name, policy.Type, policy.Properties)
case v1alpha1.TopologyPolicyType:
w, err = p.makeBuiltInPolicy(policy.Name, policy.Type, policy.Properties)
case v1alpha1.OverridePolicyType:
@@ -1,60 +0,0 @@
"env-binding": {
type: "policy"
annotations: {}
labels: {}
description: "Provides differentiated configuration and environment scheduling policies for application."
}
template: {
output: {
apiVersion: "core.oam.dev/v1alpha1"
kind: "EnvBinding"
spec: {
engine: parameter.clusterManagementEngine
appTemplate: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: context.appName
namespace: context.namespace
}
spec: {
components: context.components
}
}
envs: parameter.envs
outputResourcesTo: {
name: context.name
namespace: context.namespace
}
}
}
#Env: {
name: string
patch: components: [...{
name: string
type: string
properties: {...}
traits?: [...{
type: string
properties: {...}
}]
}]
placement: {
clusterSelector?: {
labels?: [string]: string
name?: string
}
namespaceSelector?: {
labels?: [string]: string
name?: string
}
}
selector?: {
components: [...string]
}
}
parameter: {
clusterManagementEngine: *"cluster-gateway" | string
envs: [...#Env]
}
}