mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 10:00:06 +00:00
Feat: remove unused crd in chart (#5899)
* Feat: remove unused crd in chart Signed-off-by: Somefive <yd219913@alibaba-inc.com> * fix test Signed-off-by: Somefive <yd219913@alibaba-inc.com> --------- Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
5
Makefile
5
Makefile
@@ -113,7 +113,7 @@ manifests: installcue kustomize
|
||||
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
|
||||
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
|
||||
./hack/crd/cleanup.sh
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds runtime/ charts/vela-minimal/crds
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds
|
||||
rm -f config/crd/base/*
|
||||
./vela-templates/gen_definitions.sh
|
||||
|
||||
@@ -132,5 +132,4 @@ def-install:
|
||||
./hack/utils/installdefinition.sh
|
||||
|
||||
helm-doc-gen: helmdoc
|
||||
readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md
|
||||
readme-generator -v charts/vela-minimal/values.yaml -r charts/vela-minimal/README.md
|
||||
readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md
|
||||
@@ -200,11 +200,8 @@ func TestResourceTrackerCompression(t *testing.T) {
|
||||
"../../../charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_applications.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_healthscopes.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml",
|
||||
"../../../charts/vela-core/crds/core.oam.dev_workloaddefinitions.yaml",
|
||||
"../../../charts/vela-core/crds/standard.oam.dev_rollouts.yaml",
|
||||
"../../../charts/vela-core/templates/kubevela-controller.yaml",
|
||||
"../../../charts/vela-core/README.md",
|
||||
"../../../pkg/velaql/providers/query/testdata/machinelearning.seldon.io_seldondeployments.yaml",
|
||||
|
||||
@@ -38,16 +38,16 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
|
||||
|
||||
### KubeVela core parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------- | --------------------------------------------------------------------------------------------- | --------- |
|
||||
| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` |
|
||||
| `applicationRevisionLimit` | Application revision limit | `2` |
|
||||
| `definitionRevisionLimit` | Definition revision limit | `2` |
|
||||
| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` |
|
||||
| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` |
|
||||
| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `v0.3` |
|
||||
| `disableCaps` | Disable capability | `rollout` |
|
||||
| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` |
|
||||
| Name | Description | Value |
|
||||
| ----------------------------- | --------------------------------------------------------------------------------------------- | ------ |
|
||||
| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` |
|
||||
| `applicationRevisionLimit` | Application revision limit | `2` |
|
||||
| `definitionRevisionLimit` | Definition revision limit | `2` |
|
||||
| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` |
|
||||
| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` |
|
||||
| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `v0.3` |
|
||||
| `disableCaps` | Disable capability | `all` |
|
||||
| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` |
|
||||
|
||||
### KubeVela workflow parameters
|
||||
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: scopedefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ScopeDefinition
|
||||
listKind: ScopeDefinitionList
|
||||
plural: scopedefinitions
|
||||
shortNames:
|
||||
- scope
|
||||
singular: scopedefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -1,477 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: rollouts.standard.oam.dev
|
||||
spec:
|
||||
group: standard.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: Rollout
|
||||
listKind: RolloutList
|
||||
plural: rollouts
|
||||
shortNames:
|
||||
- rollout
|
||||
singular: rollout
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.rolloutTargetSize
|
||||
name: TARGET
|
||||
type: string
|
||||
- jsonPath: .status.upgradedReplicas
|
||||
name: UPGRADED
|
||||
type: string
|
||||
- jsonPath: .status.upgradedReadyReplicas
|
||||
name: READY
|
||||
type: string
|
||||
- jsonPath: .status.batchRollingState
|
||||
name: BATCH-STATE
|
||||
type: string
|
||||
- jsonPath: .status.rollingState
|
||||
name: ROLLING-STATE
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Rollout is the Schema for the Rollout API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: RolloutSpec defines how to describe an update between different
|
||||
compRevision
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName specify the component name
|
||||
type: string
|
||||
rolloutPlan:
|
||||
description: RolloutPlan is the details on how to rollout the resources
|
||||
properties:
|
||||
batchPartition:
|
||||
description: All pods in the batches up to the batchPartition
|
||||
(included) will have the target resource specification while
|
||||
the rest still have the source resource This is designed for
|
||||
the operators to manually rollout Default is the the number
|
||||
of batches which will rollout all the batches
|
||||
format: int32
|
||||
type: integer
|
||||
canaryMetric:
|
||||
description: CanaryMetric provides a way for the rollout process
|
||||
to automatically check certain metrics before complete the process
|
||||
items:
|
||||
description: CanaryMetric holds the reference to metrics used
|
||||
for canary analysis
|
||||
properties:
|
||||
interval:
|
||||
description: Interval represents the windows size
|
||||
type: string
|
||||
metricsRange:
|
||||
description: Range value accepted for this metric
|
||||
properties:
|
||||
max:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Maximum value
|
||||
x-kubernetes-int-or-string: true
|
||||
min:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Minimum value
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the metric
|
||||
type: string
|
||||
templateRef:
|
||||
description: TemplateRef references a metric template object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a
|
||||
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this
|
||||
field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
numBatches:
|
||||
description: The number of batches, default = 1
|
||||
format: int32
|
||||
type: integer
|
||||
paused:
|
||||
description: Paused the rollout, default is false
|
||||
type: boolean
|
||||
rolloutBatches:
|
||||
description: The exact distribution among batches. its size has
|
||||
to be exactly the same as the NumBatches (if set) The total
|
||||
number cannot exceed the targetSize or the size of the source
|
||||
resource We will IGNORE the last batch's replica field if it's
|
||||
a percentage since round errors can lead to inaccurate sum We
|
||||
highly recommend to leave the last batch's replica field empty
|
||||
items:
|
||||
description: RolloutBatch is used to describe how the each batch
|
||||
rollout should be
|
||||
properties:
|
||||
batchRolloutWebhooks:
|
||||
description: RolloutWebhooks provides a way for the batch
|
||||
rollout to interact with an external process
|
||||
items:
|
||||
description: RolloutWebhook holds the reference to external
|
||||
checks used for canary analysis
|
||||
properties:
|
||||
expectedStatus:
|
||||
description: ExpectedStatus contains all the expected
|
||||
http status code that we will accept as success
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
metadata:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Metadata (key-value pairs) for this webhook
|
||||
type: object
|
||||
method:
|
||||
description: Method the HTTP call method, default
|
||||
is POST
|
||||
type: string
|
||||
name:
|
||||
description: Name of this webhook
|
||||
type: string
|
||||
type:
|
||||
description: Type of this webhook
|
||||
type: string
|
||||
url:
|
||||
description: URL address of this webhook
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
type: array
|
||||
canaryMetric:
|
||||
description: CanaryMetric provides a way for the batch rollout
|
||||
process to automatically check certain metrics before
|
||||
moving to the next batch
|
||||
items:
|
||||
description: CanaryMetric holds the reference to metrics
|
||||
used for canary analysis
|
||||
properties:
|
||||
interval:
|
||||
description: Interval represents the windows size
|
||||
type: string
|
||||
metricsRange:
|
||||
description: Range value accepted for this metric
|
||||
properties:
|
||||
max:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Maximum value
|
||||
x-kubernetes-int-or-string: true
|
||||
min:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Minimum value
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the metric
|
||||
type: string
|
||||
templateRef:
|
||||
description: TemplateRef references a metric template
|
||||
object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a
|
||||
container within a pod, this would take on a
|
||||
value like: "spec.containers{name}" (where "name"
|
||||
refers to the name of the container that triggered
|
||||
the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2
|
||||
in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a
|
||||
part of an object. TODO: this design is not
|
||||
final and this field is subject to change in
|
||||
the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info:
|
||||
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More
|
||||
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which
|
||||
this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
instanceInterval:
|
||||
description: The wait time, in seconds, between instances
|
||||
upgrades, default = 0
|
||||
format: int32
|
||||
type: integer
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: MaxUnavailable is the max allowed number of
|
||||
pods that is unavailable during the upgrade. We will mark
|
||||
the batch as ready as long as there are less or equal
|
||||
number of pods unavailable than this number. default =
|
||||
0
|
||||
x-kubernetes-int-or-string: true
|
||||
podList:
|
||||
description: The list of Pods to get upgraded it is mutually
|
||||
exclusive with the Replicas field
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
replicas:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'Replicas is the number of pods to upgrade
|
||||
in this batch it can be an absolute number (ex: 5) or
|
||||
a percentage of total pods we will ignore the percentage
|
||||
of the last batch to just fill the gap it is mutually
|
||||
exclusive with the PodList field'
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
type: array
|
||||
rolloutStrategy:
|
||||
description: RolloutStrategy defines strategies for the rollout
|
||||
plan The default is IncreaseFirstRolloutStrategyType
|
||||
type: string
|
||||
rolloutWebhooks:
|
||||
description: RolloutWebhooks provide a way for the rollout to
|
||||
interact with an external process
|
||||
items:
|
||||
description: RolloutWebhook holds the reference to external
|
||||
checks used for canary analysis
|
||||
properties:
|
||||
expectedStatus:
|
||||
description: ExpectedStatus contains all the expected http
|
||||
status code that we will accept as success
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
metadata:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Metadata (key-value pairs) for this webhook
|
||||
type: object
|
||||
method:
|
||||
description: Method the HTTP call method, default is POST
|
||||
type: string
|
||||
name:
|
||||
description: Name of this webhook
|
||||
type: string
|
||||
type:
|
||||
description: Type of this webhook
|
||||
type: string
|
||||
url:
|
||||
description: URL address of this webhook
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
type: array
|
||||
targetSize:
|
||||
description: The size of the target resource. The default is the
|
||||
same as the size of the source resource.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
sourceRevisionName:
|
||||
description: SourceRevisionName contains the name of the componentRevisionName that
|
||||
we need to upgrade from. it can be empty only when it's the first
|
||||
time to deploy the application
|
||||
type: string
|
||||
targetRevisionName:
|
||||
description: TargetRevisionName contains the name of the componentRevisionName
|
||||
that we need to upgrade to.
|
||||
type: string
|
||||
required:
|
||||
- componentName
|
||||
- rolloutPlan
|
||||
- targetRevisionName
|
||||
type: object
|
||||
status:
|
||||
description: CompRolloutStatus defines the observed state of rollout
|
||||
properties:
|
||||
LastSourceRevision:
|
||||
description: LastSourceRevision contains the name of the componentRevisionName
|
||||
that we need to upgrade from. We will restart the rollout if this
|
||||
is not the same as the spec
|
||||
type: string
|
||||
batchRollingState:
|
||||
description: BatchRollingState only meaningful when the Status is
|
||||
rolling
|
||||
type: string
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
currentBatch:
|
||||
description: The current batch the rollout is working on/blocked it
|
||||
starts from 0
|
||||
format: int32
|
||||
type: integer
|
||||
lastAppliedPodTemplateIdentifier:
|
||||
description: lastAppliedPodTemplateIdentifier is a string that uniquely
|
||||
represent the last pod template each workload type could use different
|
||||
ways to identify that so we cannot compare between resources We
|
||||
update this field only after a successful rollout
|
||||
type: string
|
||||
lastTargetRevision:
|
||||
description: LastUpgradedTargetRevision contains the name of the componentRevisionName
|
||||
that we upgraded to We will restart the rollout if this is not the
|
||||
same as the spec
|
||||
type: string
|
||||
rollingState:
|
||||
description: RollingState is the Rollout State
|
||||
type: string
|
||||
rolloutOriginalSize:
|
||||
description: RolloutTargetSize is the size of the target resources.
|
||||
This is determined once the initial spec verification and does not
|
||||
change until the rollout is restarted
|
||||
format: int32
|
||||
type: integer
|
||||
rolloutTargetSize:
|
||||
description: RolloutTargetSize is the size of the target resources.
|
||||
This is determined once the initial spec verification and does not
|
||||
change until the rollout is restarted
|
||||
format: int32
|
||||
type: integer
|
||||
targetGeneration:
|
||||
description: NewPodTemplateIdentifier is a string that uniquely represent
|
||||
the new pod template each workload type could use different ways
|
||||
to identify that so we cannot compare between resources
|
||||
type: string
|
||||
upgradedReadyReplicas:
|
||||
description: UpgradedReadyReplicas is the number of Pods upgraded
|
||||
by the rollout controller that have a Ready Condition.
|
||||
format: int32
|
||||
type: integer
|
||||
upgradedReplicas:
|
||||
description: UpgradedReplicas is the number of Pods upgraded by the
|
||||
rollout controller
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- currentBatch
|
||||
- lastTargetRevision
|
||||
- rollingState
|
||||
- upgradedReadyReplicas
|
||||
- upgradedReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,10 +0,0 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkloadDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: "autodetects.core.oam.dev is the default workload type of ComponentDefinition"
|
||||
name: autodetects.core.oam.dev
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
definitionRef:
|
||||
name: autodetects.core.oam.dev
|
||||
@@ -1,10 +0,0 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ScopeDefinition
|
||||
metadata:
|
||||
name: healthscopes.core.oam.dev
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
workloadRefsPath: spec.workloadRefs
|
||||
allowComponentOverlap: true
|
||||
definitionRef:
|
||||
name: healthscopes.core.oam.dev
|
||||
@@ -24,7 +24,7 @@ controllerArgs:
|
||||
OAMSpecVer: "v0.3"
|
||||
|
||||
## @param disableCaps Disable capability
|
||||
disableCaps: "rollout"
|
||||
disableCaps: "all"
|
||||
|
||||
## @param dependCheckWait dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready
|
||||
dependCheckWait: 30s
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -1,24 +0,0 @@
|
||||
apiVersion: v1
|
||||
name: vela-minimal
|
||||
description: A Helm chart for KubeVela minimal
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: 0.1.0
|
||||
|
||||
home: https://kubevela.io
|
||||
icon: https://kubevela.io/img/logo.jpg
|
||||
@@ -1,152 +0,0 @@
|
||||
<div style="text-align: center">
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/kubevela/kubevela.io/main/docs/resources/KubeVela-03.png">
|
||||
<br><br>
|
||||
<i>Make shipping applications more enjoyable.</i>
|
||||
</p>
|
||||
</div>
|
||||
|
||||

|
||||
[](https://goreportcard.com/report/github.com/kubevela/kubevela)
|
||||

|
||||
[](https://codecov.io/gh/kubevela/kubevela)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/kubevela/kubevela/releases)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/oam-dev/kubevela)
|
||||
[](https://twitter.com/oam_dev)
|
||||
[](https://artifacthub.io/packages/search?repo=kubevela)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/4602)
|
||||
|
||||
# KubeVela Minimal helm chart
|
||||
|
||||
KubeVela is a modern application platform that makes deploying and managing applications across today's hybrid, multi-cloud environments easier and faster.
|
||||
|
||||
KubeVela Minimal is the minimal version of KubeVela, it only contains the minimal components to run KubeVela and do not support features like multi clusters and env binding. For more complete experience, please install the [full version of KubeVela]((https://kubevela.io/docs/install)).
|
||||
|
||||
KubeVela Minimal contains the following CRDs:
|
||||
|
||||
CRD Name | Usage
|
||||
------------ | -------------
|
||||
applications.core.oam.dev | KubeVela Core Application Object
|
||||
applicationrevisions.core.oam.dev | The revision CRD of Application
|
||||
componentdefinitions.core.oam.dev | ComponentDefinition Object
|
||||
traitdefinitions.core.oam.dev | TraitDefinition Object
|
||||
workflowstepdefinitions.core.oam.dev | Workflowstep Object
|
||||
scopedefinitions.core.oam.dev | ScopeDefinition Object
|
||||
policydefinitions.core.oam.dev | PolicyDefinition Object
|
||||
workloaddefinitions.core.oam.dev | WorkloadDefinition Object
|
||||
definitionrevisions.core.oam.dev | The revision CRD for all definition objects
|
||||
rollouts.standard.oam.dev | Rollout feature trait
|
||||
resourcetrackers.core.oam.dev | Garbage Collection feature
|
||||
healthscopes.core.oam.dev | Health Check feature
|
||||
|
||||
## TL;DR
|
||||
|
||||
```bash
|
||||
helm repo add kubevela https://charts.kubevela.net/core
|
||||
helm repo update
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --wait
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes >= v1.19 && < v1.22
|
||||
|
||||
## Parameters
|
||||
|
||||
### KubeVela core parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------- | --------------------------------------------------------------------------------------------- | -------------------- |
|
||||
| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` |
|
||||
| `applicationRevisionLimit` | Application revision limit | `10` |
|
||||
| `definitionRevisionLimit` | Definition revision limit | `20` |
|
||||
| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` |
|
||||
| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` |
|
||||
| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `minimal` |
|
||||
| `disableCaps` | Disable capability | `envbinding,rollout` |
|
||||
| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` |
|
||||
|
||||
### KubeVela workflow parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------- | ------------------------------------------------------ | ------- |
|
||||
| `workflow.enableSuspendOnFailure` | Enable suspend on workflow failure | `false` |
|
||||
| `workflow.backoff.maxTime.waitState` | The max backoff time of workflow in a wait condition | `60` |
|
||||
| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` |
|
||||
| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` |
|
||||
|
||||
### KubeVela controller parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------- | ------------------------------------ | ------------------ |
|
||||
| `replicaCount` | KubeVela controller replica count | `1` |
|
||||
| `imageRegistry` | Image registry | `""` |
|
||||
| `image.repository` | Image repository | `oamdev/vela-core` |
|
||||
| `image.tag` | Image tag | `latest` |
|
||||
| `image.pullPolicy` | Image pull policy | `Always` |
|
||||
| `resources.limits.cpu` | KubeVela controller's cpu limit | `500m` |
|
||||
| `resources.limits.memory` | KubeVela controller's memory limit | `1Gi` |
|
||||
| `resources.requests.cpu` | KubeVela controller's cpu request | `50m` |
|
||||
| `resources.requests.memory` | KubeVela controller's memory request | `20Mi` |
|
||||
| `webhookService.type` | KubeVela webhook service type | `ClusterIP` |
|
||||
| `webhookService.port` | KubeVela webhook service port | `9443` |
|
||||
| `healthCheck.port` | KubeVela health check port | `9440` |
|
||||
|
||||
### KubeVela controller optimization parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `featureGates.applyOnce` | if enabled, the apply-once feature will be applied to all applications, no state-keep and no resource data storage in ResourceTracker | `false` |
|
||||
|
||||
### MultiCluster parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
|
||||
| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` |
|
||||
| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` |
|
||||
| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` |
|
||||
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.8.0-alpha.3` |
|
||||
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
|
||||
| `multicluster.clusterGateway.resources.requests.cpu` | ClusterGateway cpu request | `50m` |
|
||||
| `multicluster.clusterGateway.resources.requests.memory` | ClusterGateway memory request | `20Mi` |
|
||||
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `500m` |
|
||||
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
|
||||
| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` |
|
||||
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
|
||||
|
||||
### Test parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------- | ------------------- | -------------------- |
|
||||
| `test.app.repository` | Test app repository | `oamdev/hello-world` |
|
||||
| `test.app.tag` | Test app tag | `v1` |
|
||||
| `test.k8s.repository` | Test k8s repository | `oamdev/alpine-k8s` |
|
||||
| `test.k8s.tag` | Test k8s tag | `1.18.2` |
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
||||
| `imagePullSecrets` | Image pull secrets | `[]` |
|
||||
| `nameOverride` | Override name | `""` |
|
||||
| `fullnameOverride` | Fullname override | `""` |
|
||||
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
|
||||
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
|
||||
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` |
|
||||
| `nodeSelector` | Node selector | `{}` |
|
||||
| `tolerations` | Tolerations | `[]` |
|
||||
| `affinity` | Affinity | `{}` |
|
||||
| `rbac.create` | Specifies whether a RBAC role should be created | `true` |
|
||||
| `logDebug` | Enable debug logs for development purpose | `false` |
|
||||
| `logFilePath` | If non-empty, write log files in this path | `""` |
|
||||
| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` |
|
||||
| `kubeClient.qps` | The qps for reconcile clients, default is 50 | `50` |
|
||||
| `kubeClient.burst` | The burst for reconcile clients, default is 100 | `100` |
|
||||
| `authentication.enabled` | Enable authentication for application | `false` |
|
||||
| `authentication.withUser` | Application authentication will impersonate as the request User | `false` |
|
||||
| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` |
|
||||
| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` |
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,565 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: componentdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ComponentDefinition
|
||||
listKind: ComponentDefinitionList
|
||||
plural: componentdefinitions
|
||||
shortNames:
|
||||
- comp
|
||||
singular: componentdefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.workload.definition.kind
|
||||
name: WORKLOAD-KIND
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ComponentDefinition is the Schema for the componentdefinitions
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ComponentDefinitionSpec defines the desired state of ComponentDefinition
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workload:
|
||||
description: Workload is a workload type descriptor
|
||||
properties:
|
||||
definition:
|
||||
description: Definition mutually exclusive to workload.type, a
|
||||
embedded WorkloadDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type:
|
||||
description: Type ref to a WorkloadDefinition via name
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- workload
|
||||
type: object
|
||||
status:
|
||||
description: ComponentDefinitionStatus is the status of ComponentDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources:
|
||||
status: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.workload.definition.kind
|
||||
name: WORKLOAD-KIND
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ComponentDefinition is the Schema for the componentdefinitions
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ComponentDefinitionSpec defines the desired state of ComponentDefinition
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workload:
|
||||
description: Workload is a workload type descriptor
|
||||
properties:
|
||||
definition:
|
||||
description: Definition mutually exclusive to workload.type, a
|
||||
embedded WorkloadDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type:
|
||||
description: Type ref to a WorkloadDefinition via name
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- workload
|
||||
type: object
|
||||
status:
|
||||
description: ComponentDefinitionStatus is the status of ComponentDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,586 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: healthscopes.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: HealthScope
|
||||
listKind: HealthScopeList
|
||||
plural: healthscopes
|
||||
singular: healthscope
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.health
|
||||
name: HEALTH
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A HealthScope determines an aggregate health status based of
|
||||
the health of components.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A HealthScopeSpec defines the desired state of a HealthScope.
|
||||
properties:
|
||||
appReferences:
|
||||
description: AppRefs records references of applications' components
|
||||
items:
|
||||
description: AppReference records references of an application's
|
||||
components
|
||||
properties:
|
||||
appName:
|
||||
type: string
|
||||
compReferences:
|
||||
items:
|
||||
description: CompReference records references of a component's
|
||||
resources
|
||||
properties:
|
||||
compName:
|
||||
type: string
|
||||
traits:
|
||||
items:
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object.
|
||||
--- New uses of this type are discouraged because
|
||||
of difficulty describing its usage when embedded in
|
||||
APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual
|
||||
usage. 2. Invalid usage help. It is impossible to
|
||||
add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\"
|
||||
or \"name must be restricted\". Those cannot be well
|
||||
described when embedded. 3. Inconsistent validation.
|
||||
\ Because the usages are different, the validation
|
||||
rules are different by usage, which makes it hard
|
||||
for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity
|
||||
during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource
|
||||
tuple and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type
|
||||
is embedded in many locations, updates to this type
|
||||
will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control.
|
||||
\n Instead of using this type, create a locally provided
|
||||
and used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to
|
||||
the name of the container that triggered the event)
|
||||
or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax
|
||||
is chosen only to have some well-defined way of
|
||||
referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change
|
||||
in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which
|
||||
this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
workload:
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. ---
|
||||
New uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored
|
||||
fields. It includes many fields which are not generally
|
||||
honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are
|
||||
particular restrictions like, \"must refer only to types
|
||||
A and B\" or \"UID not honored\" or \"name must be restricted\".
|
||||
Those cannot be well described when embedded. 3. Inconsistent
|
||||
validation. Because the usages are different, the validation
|
||||
rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are
|
||||
both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during
|
||||
interpretation and require a REST mapping. In most
|
||||
cases, the dependency is on the group,resource tuple
|
||||
and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will
|
||||
affect numerous schemas. Don't make new APIs embed
|
||||
an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used
|
||||
type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
probe-interval:
|
||||
description: ProbeInterval is the amount of time in seconds between
|
||||
probing tries.
|
||||
format: int32
|
||||
type: integer
|
||||
probe-timeout:
|
||||
description: ProbeTimeout is the amount of time in seconds to wait
|
||||
when receiving a response before marked failure.
|
||||
format: int32
|
||||
type: integer
|
||||
workloadRefs:
|
||||
description: WorkloadReferences to the workloads that are in this
|
||||
scope.
|
||||
items:
|
||||
description: "ObjectReference contains enough information to let
|
||||
you inspect or modify the referred object. --- New uses of this
|
||||
type are discouraged because of difficulty describing its usage
|
||||
when embedded in APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for individual
|
||||
usage. In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not honored\"
|
||||
or \"name must be restricted\". Those cannot be well described
|
||||
when embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage, which
|
||||
makes it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual struct
|
||||
is irrelevant. 5. We cannot easily change it. Because this type
|
||||
is embedded in many locations, updates to this type will affect
|
||||
numerous schemas. Don't make new APIs embed an underspecified
|
||||
API type they do not control. \n Instead of using this type, create
|
||||
a locally provided and used type that is well-focused on your
|
||||
reference. For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
required:
|
||||
- workloadRefs
|
||||
type: object
|
||||
status:
|
||||
description: A HealthScopeStatus represents the observed state of a HealthScope.
|
||||
properties:
|
||||
appHealthConditions:
|
||||
description: AppHealthConditions represents health condition of applications
|
||||
in the scope
|
||||
items:
|
||||
description: AppHealthCondition represents health condition of an
|
||||
application
|
||||
properties:
|
||||
appName:
|
||||
type: string
|
||||
components:
|
||||
items:
|
||||
description: WorkloadHealthCondition represents informative
|
||||
health condition of a workload.
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName represents the component name
|
||||
if target is a workload
|
||||
type: string
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
targetWorkload:
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. ---
|
||||
New uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored
|
||||
fields. It includes many fields which are not generally
|
||||
honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are
|
||||
particular restrictions like, \"must refer only to types
|
||||
A and B\" or \"UID not honored\" or \"name must be restricted\".
|
||||
Those cannot be well described when embedded. 3. Inconsistent
|
||||
validation. Because the usages are different, the validation
|
||||
rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are
|
||||
both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during
|
||||
interpretation and require a REST mapping. In most
|
||||
cases, the dependency is on the group,resource tuple
|
||||
and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will
|
||||
affect numerous schemas. Don't make new APIs embed
|
||||
an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used
|
||||
type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
traits:
|
||||
items:
|
||||
description: TraitHealthCondition represents informative
|
||||
health condition of a trait.
|
||||
properties:
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status
|
||||
strings.
|
||||
type: string
|
||||
resource:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
- resource
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
workloadStatus:
|
||||
description: WorkloadStatus represents status of workloads
|
||||
whose HealthStatus is UNKNOWN.
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
envName:
|
||||
type: string
|
||||
required:
|
||||
- appName
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
healthConditions:
|
||||
description: WorkloadHealthConditions represents health condition
|
||||
of workloads in the scope Use AppHealthConditions to provide app
|
||||
level status
|
||||
items:
|
||||
description: WorkloadHealthCondition represents informative health
|
||||
condition of a workload.
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName represents the component name if
|
||||
target is a workload
|
||||
type: string
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
targetWorkload:
|
||||
description: "ObjectReference contains enough information to
|
||||
let you inspect or modify the referred object. --- New uses
|
||||
of this type are discouraged because of difficulty describing
|
||||
its usage when embedded in APIs. 1. Ignored fields. It includes
|
||||
many fields which are not generally honored. For instance,
|
||||
ResourceVersion and FieldPath are both very rarely valid in
|
||||
actual usage. 2. Invalid usage help. It is impossible to
|
||||
add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, \"must refer
|
||||
only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different,
|
||||
the validation rules are different by usage, which makes it
|
||||
hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this type
|
||||
will affect numerous schemas. Don't make new APIs embed an
|
||||
underspecified API type they do not control. \n Instead of
|
||||
using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a valid
|
||||
JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that
|
||||
triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod).
|
||||
This syntax is chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change in the
|
||||
future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
traits:
|
||||
items:
|
||||
description: TraitHealthCondition represents informative health
|
||||
condition of a trait.
|
||||
properties:
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
resource:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
- resource
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
workloadStatus:
|
||||
description: WorkloadStatus represents status of workloads whose
|
||||
HealthStatus is UNKNOWN.
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
scopeHealthCondition:
|
||||
description: ScopeHealthCondition represents health condition summary
|
||||
of the scope
|
||||
properties:
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
healthyWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
total:
|
||||
format: int64
|
||||
type: integer
|
||||
unhealthyWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
unknownWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
required:
|
||||
- scopeHealthCondition
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,286 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: policydefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: PolicyDefinition
|
||||
listKind: PolicyDefinitionList
|
||||
plural: policydefinitions
|
||||
shortNames:
|
||||
- def-policy
|
||||
singular: policydefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PolicyDefinition is the Schema for the policydefinitions API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PolicyDefinitionSpec defines the desired state of PolicyDefinition
|
||||
properties:
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
manageHealthCheck:
|
||||
description: ManageHealthCheck means the policy will handle health
|
||||
checking and skip application controller built-in health checking.
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the policy definition. Only CUE schematic is supported
|
||||
for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: PolicyDefinitionStatus is the status of PolicyDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,187 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: resourcetrackers.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ResourceTracker
|
||||
listKind: ResourceTrackerList
|
||||
plural: resourcetrackers
|
||||
shortNames:
|
||||
- rt
|
||||
singular: resourcetracker
|
||||
scope: Cluster
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.type
|
||||
name: TYPE
|
||||
type: string
|
||||
- jsonPath: .metadata.labels['app\.oam\.dev\/name']
|
||||
name: APP
|
||||
type: string
|
||||
- jsonPath: .metadata.labels['app\.oam\.dev\/namespace']
|
||||
name: APP-NS
|
||||
type: string
|
||||
- jsonPath: .spec.applicationGeneration
|
||||
name: APP-GEN
|
||||
type: number
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: An ResourceTracker represents a tracker for track cross namespace
|
||||
resources
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ResourceTrackerSpec define the spec of resourceTracker
|
||||
properties:
|
||||
applicationGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
compression:
|
||||
description: ResourceTrackerCompression represents the compressed
|
||||
components in ResourceTracker.
|
||||
properties:
|
||||
data:
|
||||
type: string
|
||||
type:
|
||||
description: Type the compression type
|
||||
type: string
|
||||
type: object
|
||||
managedResources:
|
||||
items:
|
||||
description: ManagedResource define the resource to be managed by
|
||||
ResourceTracker
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
cluster:
|
||||
type: string
|
||||
component:
|
||||
type: string
|
||||
creator:
|
||||
type: string
|
||||
deleted:
|
||||
description: Deleted marks the resource to be deleted
|
||||
type: boolean
|
||||
env:
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
raw:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
skipGC:
|
||||
description: SkipGC marks the resource to skip gc
|
||||
type: boolean
|
||||
trait:
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
type:
|
||||
description: ResourceTrackerType defines the type of resourceTracker
|
||||
type: string
|
||||
required:
|
||||
- applicationGeneration
|
||||
type: object
|
||||
status:
|
||||
description: ResourceTrackerStatus define the status of resourceTracker
|
||||
For backward-compatibility
|
||||
properties:
|
||||
trackedResources:
|
||||
description: Deprecated
|
||||
items:
|
||||
description: ClusterObjectReference defines the object reference
|
||||
with cluster.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
cluster:
|
||||
type: string
|
||||
creator:
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,146 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: scopedefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ScopeDefinition
|
||||
listKind: ScopeDefinitionList
|
||||
plural: scopedefinitions
|
||||
shortNames:
|
||||
- scope
|
||||
singular: scopedefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -1,673 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: traitdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: TraitDefinition
|
||||
listKind: TraitDefinitionList
|
||||
plural: traitdefinitions
|
||||
shortNames:
|
||||
- trait
|
||||
singular: traitdefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.appliesToWorkloads
|
||||
name: APPLIES-TO
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A TraitDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the trait when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: AppliesToWorkloads specifies the list of workload kinds
|
||||
this trait applies to. Workload kinds are specified in kind.group/version
|
||||
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
|
||||
field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: 'ConflictsWith specifies the list of traits(CRD name,
|
||||
Definition name, CRD group) which could not apply to the same workloads
|
||||
with this trait. Traits that omit this field can work with any other
|
||||
traits. Example rules: "service" # Trait definition name "services.k8s.io"
|
||||
# API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podDisruptive:
|
||||
description: PodDisruptive specifies whether using the trait will
|
||||
cause the pod to restart or not.
|
||||
type: boolean
|
||||
revisionEnabled:
|
||||
description: Revision indicates whether a trait is aware of component
|
||||
revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the trait
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for trait
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workloadRefPath:
|
||||
description: WorkloadRefPath indicates where/if a trait accepts a
|
||||
workloadRef object
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: TraitDefinitionStatus is the status of TraitDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the trait definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources:
|
||||
status: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.appliesToWorkloads
|
||||
name: APPLIES-TO
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A TraitDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the trait when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: AppliesToWorkloads specifies the list of workload kinds
|
||||
this trait applies to. Workload kinds are specified in resource.group/version
|
||||
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
|
||||
field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: 'ConflictsWith specifies the list of traits(CRD name,
|
||||
Definition name, CRD group) which could not apply to the same workloads
|
||||
with this trait. Traits that omit this field can work with any other
|
||||
traits. Example rules: "service" # Trait definition name "services.k8s.io"
|
||||
# API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
controlPlaneOnly:
|
||||
description: ControlPlaneOnly defines which cluster is dispatched
|
||||
to
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
manageWorkload:
|
||||
description: ManageWorkload defines the trait would be responsible
|
||||
for creating the workload
|
||||
type: boolean
|
||||
podDisruptive:
|
||||
description: PodDisruptive specifies whether using the trait will
|
||||
cause the pod to restart or not.
|
||||
type: boolean
|
||||
revisionEnabled:
|
||||
description: Revision indicates whether a trait is aware of component
|
||||
revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the trait. Only CUE and Kube schematic are supported
|
||||
for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
stage:
|
||||
description: Stage defines the stage information to which this trait
|
||||
resource processing belongs. Currently, PreDispatch and PostDispatch
|
||||
are provided, which are used to control resource pre-process and
|
||||
post-process respectively.
|
||||
type: string
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for trait
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workloadRefPath:
|
||||
description: WorkloadRefPath indicates where/if a trait accepts a
|
||||
workloadRef object
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: TraitDefinitionStatus is the status of TraitDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,283 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: workflowstepdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: WorkflowStepDefinition
|
||||
listKind: WorkflowStepDefinitionList
|
||||
plural: workflowstepdefinitions
|
||||
shortNames:
|
||||
- workflowstep
|
||||
singular: workflowstepdefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: WorkflowStepDefinition is the Schema for the workflowstepdefinitions
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: WorkflowStepDefinitionSpec defines the desired state of WorkflowStepDefinition
|
||||
properties:
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workflow step definition. Only CUE schematic
|
||||
is supported for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: WorkflowStepDefinitionStatus is the status of WorkflowStepDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1,625 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: workloaddefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: WorkloadDefinition
|
||||
listKind: WorkloadDefinitionList
|
||||
plural: workloaddefinitions
|
||||
shortNames:
|
||||
- workload
|
||||
singular: workloaddefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A WorkloadDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM workload kind by referencing its CustomResourceDefinition.
|
||||
The CRD is used to validate the schema of the workload when it is embedded
|
||||
in an OAM Component.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this workload kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- definitionRef
|
||||
type: object
|
||||
status:
|
||||
description: WorkloadDefinitionStatus is the status of WorkloadDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A WorkloadDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM workload kind by referencing its CustomResourceDefinition.
|
||||
The CRD is used to validate the schema of the workload when it is embedded
|
||||
in an OAM Component.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this workload kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
customRegion:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
gitCredentialsSecretReference:
|
||||
description: GitCredentialsSecretReference specifies the reference
|
||||
to the secret containing the git credentials
|
||||
properties:
|
||||
name:
|
||||
description: name is unique within a namespace to reference
|
||||
a secret resource.
|
||||
type: string
|
||||
namespace:
|
||||
description: namespace defines the space within which
|
||||
the secret name must be unique.
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
path:
|
||||
description: Path is the sub-directory of remote git repository.
|
||||
It's valid when remote is set
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- definitionRef
|
||||
type: object
|
||||
status:
|
||||
description: WorkloadDefinitionStatus is the status of WorkloadDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -1,477 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
name: rollouts.standard.oam.dev
|
||||
spec:
|
||||
group: standard.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: Rollout
|
||||
listKind: RolloutList
|
||||
plural: rollouts
|
||||
shortNames:
|
||||
- rollout
|
||||
singular: rollout
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.rolloutTargetSize
|
||||
name: TARGET
|
||||
type: string
|
||||
- jsonPath: .status.upgradedReplicas
|
||||
name: UPGRADED
|
||||
type: string
|
||||
- jsonPath: .status.upgradedReadyReplicas
|
||||
name: READY
|
||||
type: string
|
||||
- jsonPath: .status.batchRollingState
|
||||
name: BATCH-STATE
|
||||
type: string
|
||||
- jsonPath: .status.rollingState
|
||||
name: ROLLING-STATE
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Rollout is the Schema for the Rollout API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: RolloutSpec defines how to describe an update between different
|
||||
compRevision
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName specify the component name
|
||||
type: string
|
||||
rolloutPlan:
|
||||
description: RolloutPlan is the details on how to rollout the resources
|
||||
properties:
|
||||
batchPartition:
|
||||
description: All pods in the batches up to the batchPartition
|
||||
(included) will have the target resource specification while
|
||||
the rest still have the source resource This is designed for
|
||||
the operators to manually rollout Default is the the number
|
||||
of batches which will rollout all the batches
|
||||
format: int32
|
||||
type: integer
|
||||
canaryMetric:
|
||||
description: CanaryMetric provides a way for the rollout process
|
||||
to automatically check certain metrics before complete the process
|
||||
items:
|
||||
description: CanaryMetric holds the reference to metrics used
|
||||
for canary analysis
|
||||
properties:
|
||||
interval:
|
||||
description: Interval represents the windows size
|
||||
type: string
|
||||
metricsRange:
|
||||
description: Range value accepted for this metric
|
||||
properties:
|
||||
max:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Maximum value
|
||||
x-kubernetes-int-or-string: true
|
||||
min:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Minimum value
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the metric
|
||||
type: string
|
||||
templateRef:
|
||||
description: TemplateRef references a metric template object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a
|
||||
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this
|
||||
field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
numBatches:
|
||||
description: The number of batches, default = 1
|
||||
format: int32
|
||||
type: integer
|
||||
paused:
|
||||
description: Paused the rollout, default is false
|
||||
type: boolean
|
||||
rolloutBatches:
|
||||
description: The exact distribution among batches. its size has
|
||||
to be exactly the same as the NumBatches (if set) The total
|
||||
number cannot exceed the targetSize or the size of the source
|
||||
resource We will IGNORE the last batch's replica field if it's
|
||||
a percentage since round errors can lead to inaccurate sum We
|
||||
highly recommend to leave the last batch's replica field empty
|
||||
items:
|
||||
description: RolloutBatch is used to describe how the each batch
|
||||
rollout should be
|
||||
properties:
|
||||
batchRolloutWebhooks:
|
||||
description: RolloutWebhooks provides a way for the batch
|
||||
rollout to interact with an external process
|
||||
items:
|
||||
description: RolloutWebhook holds the reference to external
|
||||
checks used for canary analysis
|
||||
properties:
|
||||
expectedStatus:
|
||||
description: ExpectedStatus contains all the expected
|
||||
http status code that we will accept as success
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
metadata:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Metadata (key-value pairs) for this webhook
|
||||
type: object
|
||||
method:
|
||||
description: Method the HTTP call method, default
|
||||
is POST
|
||||
type: string
|
||||
name:
|
||||
description: Name of this webhook
|
||||
type: string
|
||||
type:
|
||||
description: Type of this webhook
|
||||
type: string
|
||||
url:
|
||||
description: URL address of this webhook
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
type: array
|
||||
canaryMetric:
|
||||
description: CanaryMetric provides a way for the batch rollout
|
||||
process to automatically check certain metrics before
|
||||
moving to the next batch
|
||||
items:
|
||||
description: CanaryMetric holds the reference to metrics
|
||||
used for canary analysis
|
||||
properties:
|
||||
interval:
|
||||
description: Interval represents the windows size
|
||||
type: string
|
||||
metricsRange:
|
||||
description: Range value accepted for this metric
|
||||
properties:
|
||||
max:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Maximum value
|
||||
x-kubernetes-int-or-string: true
|
||||
min:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Minimum value
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the metric
|
||||
type: string
|
||||
templateRef:
|
||||
description: TemplateRef references a metric template
|
||||
object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a
|
||||
container within a pod, this would take on a
|
||||
value like: "spec.containers{name}" (where "name"
|
||||
refers to the name of the container that triggered
|
||||
the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2
|
||||
in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a
|
||||
part of an object. TODO: this design is not
|
||||
final and this field is subject to change in
|
||||
the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info:
|
||||
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More
|
||||
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which
|
||||
this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
instanceInterval:
|
||||
description: The wait time, in seconds, between instances
|
||||
upgrades, default = 0
|
||||
format: int32
|
||||
type: integer
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: MaxUnavailable is the max allowed number of
|
||||
pods that is unavailable during the upgrade. We will mark
|
||||
the batch as ready as long as there are less or equal
|
||||
number of pods unavailable than this number. default =
|
||||
0
|
||||
x-kubernetes-int-or-string: true
|
||||
podList:
|
||||
description: The list of Pods to get upgraded it is mutually
|
||||
exclusive with the Replicas field
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
replicas:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'Replicas is the number of pods to upgrade
|
||||
in this batch it can be an absolute number (ex: 5) or
|
||||
a percentage of total pods we will ignore the percentage
|
||||
of the last batch to just fill the gap it is mutually
|
||||
exclusive with the PodList field'
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
type: array
|
||||
rolloutStrategy:
|
||||
description: RolloutStrategy defines strategies for the rollout
|
||||
plan The default is IncreaseFirstRolloutStrategyType
|
||||
type: string
|
||||
rolloutWebhooks:
|
||||
description: RolloutWebhooks provide a way for the rollout to
|
||||
interact with an external process
|
||||
items:
|
||||
description: RolloutWebhook holds the reference to external
|
||||
checks used for canary analysis
|
||||
properties:
|
||||
expectedStatus:
|
||||
description: ExpectedStatus contains all the expected http
|
||||
status code that we will accept as success
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
metadata:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Metadata (key-value pairs) for this webhook
|
||||
type: object
|
||||
method:
|
||||
description: Method the HTTP call method, default is POST
|
||||
type: string
|
||||
name:
|
||||
description: Name of this webhook
|
||||
type: string
|
||||
type:
|
||||
description: Type of this webhook
|
||||
type: string
|
||||
url:
|
||||
description: URL address of this webhook
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
type: array
|
||||
targetSize:
|
||||
description: The size of the target resource. The default is the
|
||||
same as the size of the source resource.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
sourceRevisionName:
|
||||
description: SourceRevisionName contains the name of the componentRevisionName that
|
||||
we need to upgrade from. it can be empty only when it's the first
|
||||
time to deploy the application
|
||||
type: string
|
||||
targetRevisionName:
|
||||
description: TargetRevisionName contains the name of the componentRevisionName
|
||||
that we need to upgrade to.
|
||||
type: string
|
||||
required:
|
||||
- componentName
|
||||
- rolloutPlan
|
||||
- targetRevisionName
|
||||
type: object
|
||||
status:
|
||||
description: CompRolloutStatus defines the observed state of rollout
|
||||
properties:
|
||||
LastSourceRevision:
|
||||
description: LastSourceRevision contains the name of the componentRevisionName
|
||||
that we need to upgrade from. We will restart the rollout if this
|
||||
is not the same as the spec
|
||||
type: string
|
||||
batchRollingState:
|
||||
description: BatchRollingState only meaningful when the Status is
|
||||
rolling
|
||||
type: string
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
currentBatch:
|
||||
description: The current batch the rollout is working on/blocked it
|
||||
starts from 0
|
||||
format: int32
|
||||
type: integer
|
||||
lastAppliedPodTemplateIdentifier:
|
||||
description: lastAppliedPodTemplateIdentifier is a string that uniquely
|
||||
represent the last pod template each workload type could use different
|
||||
ways to identify that so we cannot compare between resources We
|
||||
update this field only after a successful rollout
|
||||
type: string
|
||||
lastTargetRevision:
|
||||
description: LastUpgradedTargetRevision contains the name of the componentRevisionName
|
||||
that we upgraded to We will restart the rollout if this is not the
|
||||
same as the spec
|
||||
type: string
|
||||
rollingState:
|
||||
description: RollingState is the Rollout State
|
||||
type: string
|
||||
rolloutOriginalSize:
|
||||
description: RolloutTargetSize is the size of the target resources.
|
||||
This is determined once the initial spec verification and does not
|
||||
change until the rollout is restarted
|
||||
format: int32
|
||||
type: integer
|
||||
rolloutTargetSize:
|
||||
description: RolloutTargetSize is the size of the target resources.
|
||||
This is determined once the initial spec verification and does not
|
||||
change until the rollout is restarted
|
||||
format: int32
|
||||
type: integer
|
||||
targetGeneration:
|
||||
description: NewPodTemplateIdentifier is a string that uniquely represent
|
||||
the new pod template each workload type could use different ways
|
||||
to identify that so we cannot compare between resources
|
||||
type: string
|
||||
upgradedReadyReplicas:
|
||||
description: UpgradedReadyReplicas is the number of Pods upgraded
|
||||
by the rollout controller that have a Ready Condition.
|
||||
format: int32
|
||||
type: integer
|
||||
upgradedReplicas:
|
||||
description: UpgradedReplicas is the number of Pods upgraded by the
|
||||
rollout controller
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- currentBatch
|
||||
- lastTargetRevision
|
||||
- rollingState
|
||||
- upgradedReadyReplicas
|
||||
- upgradedReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -1 +0,0 @@
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
@@ -1,79 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kubevela.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kubevela.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kubevela.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kubevela.labels" -}}
|
||||
helm.sh/chart: {{ include "kubevela.chart" . }}
|
||||
{{ include "kubevela.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kubevela.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kubevela.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubevela-cluster-gateway.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kubevela.name" . }}-cluster-gateway
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}-cluster-gateway
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kubevela.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "kubevela.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
systemDefinitionNamespace value defaulter
|
||||
*/}}
|
||||
{{- define "systemDefinitionNamespace" -}}
|
||||
{{- if .Values.systemDefinitionNamespace -}}
|
||||
{{ .Values.systemDefinitionNamespace }}
|
||||
{{- else -}}
|
||||
{{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,28 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
{{- end }}
|
||||
@@ -1,20 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -1,54 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission-create
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission-create
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission-create
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission-create
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
- --host={{ template "kubevela.name" . }}-webhook,{{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-admission
|
||||
- --key-name=tls.key
|
||||
- --cert-name=tls.crt
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "kubevela.fullname" . }}-admission
|
||||
{{- with .Values.admissionWebhooks.patch.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{- end }}
|
||||
@@ -1,56 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission-patch
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission-patch
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission-patch
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission-patch
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
- --webhook-name={{ template "kubevela.fullname" . }}-admission
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-admission
|
||||
- --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- if .Values.admissionWebhooks.appConversion.enabled }}
|
||||
- --crds={"name":"applications.core.oam.dev","conversion":{"strategy":"Webhook","webhook":{"clientConfig":{"service":{"name":"vela-core-webhook","namespace":"vela-system","path":"/convert","port":443}},"conversionReviewVersions":["v1beta1","v1alpha2"]}}}
|
||||
{{- end }}
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "kubevela.fullname" . }}-admission
|
||||
{{- with .Values.admissionWebhooks.patch.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{- end }}
|
||||
@@ -1,21 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
{{- end }}
|
||||
@@ -1,21 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -1,13 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.name" . }}-admission
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,148 +0,0 @@
|
||||
{{- if .Values.admissionWebhooks.enabled -}}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kubevela.fullname" .) | quote }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
{{- if eq .Values.OAMSpecVer "all"}}
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1alpha2-applicationconfigurations
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam.dev.v1alpha2.applicationconfigurations
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applicationconfigurations
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1alpha2-components
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam-dev.v1alpha2.components
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- components
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
{{- end }}
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutate-standard-oam-dev-v1alpha1-podspecworkload
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mcontainerized.kb.io
|
||||
sideEffects: None
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
rules:
|
||||
- apiGroups:
|
||||
- standard.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- podspecworkloads
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1beta1-applications
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam.dev.v1beta1.applications
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1beta1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applications
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1beta1-componentdefinitions
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam-dev.v1beta1.componentdefinitions
|
||||
sideEffects: None
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1beta1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- componentdefinitions
|
||||
|
||||
{{- end -}}
|
||||
@@ -1,172 +0,0 @@
|
||||
{{- if .Values.admissionWebhooks.enabled -}}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kubevela.fullname" .) | quote }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
{{- if eq .Values.OAMSpecVer "all"}}
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1alpha2-applicationconfigurations
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1alpha2.applicationconfigurations
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applicationconfigurations
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1alpha2-components
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1alpha2.components
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- components
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
{{- end }}
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1alpha2-traitdefinitions
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1alpha2.traitdefinitions
|
||||
sideEffects: None
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- traitdefinitions
|
||||
scope: Cluster
|
||||
timeoutSeconds: 5
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-standard-oam-dev-v1alpha1-podspecworkload
|
||||
failurePolicy: Fail
|
||||
name: vcontainerized.kb.io
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- standard.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- podspecworkloads
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1beta1-applications
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1beta1.applications
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1beta1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applications
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1beta1-componentdefinitions
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: validating.core.oam-dev.v1beta1.componentdefinitions
|
||||
sideEffects: None
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1beta1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- componentdefinitions
|
||||
{{- end -}}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if .Values.admissionWebhooks.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "kubevela.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.webhookService.type }}
|
||||
ports:
|
||||
- port: 443
|
||||
targetPort: {{ .Values.webhookService.port }}
|
||||
protocol: TCP
|
||||
name: https
|
||||
selector:
|
||||
{{ include "kubevela.selectorLabels" . | nindent 6 }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -1,53 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.certManager.enabled -}}
|
||||
|
||||
# The following manifests contain a self-signed issuer CR and a certificate CR.
|
||||
# More document can be found at https://docs.cert-manager.io
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-self-signed-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
|
||||
---
|
||||
# Generate a CA Certificate used to sign certificates for the webhook
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-root-cert
|
||||
spec:
|
||||
secretName: {{ template "kubevela.fullname" . }}-root-cert
|
||||
duration: 43800h # 5y
|
||||
issuerRef:
|
||||
name: {{ template "kubevela.fullname" . }}-self-signed-issuer
|
||||
commonName: "ca.webhook.kubevela"
|
||||
isCA: true
|
||||
|
||||
---
|
||||
# Create an Issuer that uses the above generated CA certificate to issue certs
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-root-issuer
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
ca:
|
||||
secretName: {{ template "kubevela.fullname" . }}-root-cert
|
||||
|
||||
---
|
||||
# generate a serving certificate for the apiservices to use
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
secretName: {{ template "kubevela.fullname" . }}-admission
|
||||
duration: 8760h # 1y
|
||||
issuerRef:
|
||||
name: {{ template "kubevela.fullname" . }}-root-issuer
|
||||
dnsNames:
|
||||
- {{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc
|
||||
- {{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc.cluster.local
|
||||
|
||||
{{- end }}
|
||||
@@ -1,227 +0,0 @@
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-cluster-gateway
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.multicluster.clusterGateway.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "kubevela.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ include "kubevela.fullname" . }}-cluster-gateway
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--secure-port={{ .Values.multicluster.clusterGateway.port }}"
|
||||
- "--secret-namespace={{ .Release.Namespace }}"
|
||||
- "--feature-gates=APIPriorityAndFairness=false,ClientIdentityPenetration={{ .Values.authentication.enabled }}"
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.multicluster.clusterGateway.port }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.multicluster.clusterGateway.secureTLS.certPath }}
|
||||
name: tls-cert-vol
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
volumes:
|
||||
- name: tls-cert-vol
|
||||
secret:
|
||||
defaultMode: 420
|
||||
secretName: {{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
{{ end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{ if .Values.affinity }}
|
||||
{{- toYaml .Values.affinity | nindent 8 }}
|
||||
{{ else }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 20 }}
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
{{ end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-cluster-gateway-service
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 4 }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: {{ .Values.multicluster.clusterGateway.port }}
|
||||
targetPort: {{ .Values.multicluster.clusterGateway.port }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: apiregistration.k8s.io/v1
|
||||
kind: APIService
|
||||
metadata:
|
||||
name: v1alpha1.cluster.core.oam.dev
|
||||
labels:
|
||||
api: cluster-extension-apiserver
|
||||
apiserver: "true"
|
||||
spec:
|
||||
version: v1alpha1
|
||||
group: cluster.core.oam.dev
|
||||
groupPriorityMinimum: 2000
|
||||
service:
|
||||
name: {{ .Release.Name }}-cluster-gateway-service
|
||||
namespace: {{ .Release.Namespace }}
|
||||
port: {{ .Values.multicluster.clusterGateway.port }}
|
||||
versionPriority: 10
|
||||
insecureSkipTLSVerify: {{ not .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
caBundle: Cg==
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
- --host={{ .Release.Name }}-cluster-gateway-service,{{ .Release.Name }}-cluster-gateway-service.{{ .Release.Namespace }}.svc
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
- --key-name=apiserver.key
|
||||
- --cert-name=apiserver.crt
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "kubevela.fullname" . }}-admission
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{ end }}
|
||||
---
|
||||
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
args:
|
||||
- --secret-namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ include "kubevela.serviceAccountName" . }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{ end }}
|
||||
---
|
||||
{{ if and .Values.multicluster.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy
|
||||
rules:
|
||||
- apiGroups: [ "cluster.core.oam.dev" ]
|
||||
resources: [ "clustergateways/proxy" ]
|
||||
verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy
|
||||
subjects:
|
||||
- kind: Group
|
||||
name: kubevela:client
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "kubevela.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{ end }}
|
||||
@@ -1,10 +0,0 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkloadDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: "autodetects.core.oam.dev is the default workload type of ComponentDefinition"
|
||||
name: autodetects.core.oam.dev
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
definitionRef:
|
||||
name: autodetects.core.oam.dev
|
||||
@@ -1,10 +0,0 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ScopeDefinition
|
||||
metadata:
|
||||
name: healthscopes.core.oam.dev
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
workloadRefsPath: spec.workloadRefs
|
||||
allowComponentOverlap: true
|
||||
definitionRef:
|
||||
name: healthscopes.core.oam.dev
|
||||
@@ -1,194 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/affinity.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Affinity specifies affinity and toleration K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: affinity
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: {
|
||||
if parameter.podAffinity != _|_ {
|
||||
affinity: podAffinity: {
|
||||
if parameter.podAffinity.required != _|_ {
|
||||
requiredDuringSchedulingIgnoredDuringExecution: [
|
||||
for k in parameter.podAffinity.required {
|
||||
if k.labelSelector != _|_ {
|
||||
labelSelector: k.labelSelector
|
||||
}
|
||||
if k.namespace != _|_ {
|
||||
namespace: k.namespace
|
||||
}
|
||||
topologyKey: k.topologyKey
|
||||
if k.namespaceSelector != _|_ {
|
||||
namespaceSelector: k.namespaceSelector
|
||||
}
|
||||
}]
|
||||
}
|
||||
if parameter.podAffinity.preferred != _|_ {
|
||||
preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
for k in parameter.podAffinity.preferred {
|
||||
weight: k.weight
|
||||
podAffinityTerm: k.podAffinityTerm
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
if parameter.podAntiAffinity != _|_ {
|
||||
affinity: podAntiAffinity: {
|
||||
if parameter.podAntiAffinity.required != _|_ {
|
||||
requiredDuringSchedulingIgnoredDuringExecution: [
|
||||
for k in parameter.podAntiAffinity.required {
|
||||
if k.labelSelector != _|_ {
|
||||
labelSelector: k.labelSelector
|
||||
}
|
||||
if k.namespace != _|_ {
|
||||
namespace: k.namespace
|
||||
}
|
||||
topologyKey: k.topologyKey
|
||||
if k.namespaceSelector != _|_ {
|
||||
namespaceSelector: k.namespaceSelector
|
||||
}
|
||||
}]
|
||||
}
|
||||
if parameter.podAntiAffinity.preferred != _|_ {
|
||||
preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
for k in parameter.podAntiAffinity.preferred {
|
||||
weight: k.weight
|
||||
podAffinityTerm: k.podAffinityTerm
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
if parameter.nodeAffinity != _|_ {
|
||||
affinity: nodeAffinity: {
|
||||
if parameter.nodeAffinity.required != _|_ {
|
||||
requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [
|
||||
for k in parameter.nodeAffinity.required.nodeSelectorTerms {
|
||||
if k.matchExpressions != _|_ {
|
||||
matchExpressions: k.matchExpressions
|
||||
}
|
||||
if k.matchFields != _|_ {
|
||||
matchFields: k.matchFields
|
||||
}
|
||||
}]
|
||||
}
|
||||
if parameter.nodeAffinity.preferred != _|_ {
|
||||
preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
for k in parameter.nodeAffinity.preferred {
|
||||
weight: k.weight
|
||||
preference: k.preference
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
if parameter.tolerations != _|_ {
|
||||
tolerations: [
|
||||
for k in parameter.tolerations {
|
||||
if k.key != _|_ {
|
||||
key: k.key
|
||||
}
|
||||
if k.effect != _|_ {
|
||||
effect: k.effect
|
||||
}
|
||||
if k.value != _|_ {
|
||||
value: k.value
|
||||
}
|
||||
operator: k.operator
|
||||
if k.tolerationSeconds != _|_ {
|
||||
tolerationSeconds: k.tolerationSeconds
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
#labelSelector: {
|
||||
matchLabels?: [string]: string
|
||||
matchExpressions?: [...{
|
||||
key: string
|
||||
operator: *"In" | "NotIn" | "Exists" | "DoesNotExist"
|
||||
values?: [...string]
|
||||
}]
|
||||
}
|
||||
|
||||
#podAffinityTerm: {
|
||||
labelSelector?: #labelSelector
|
||||
namespaces?: [...string]
|
||||
topologyKey: string
|
||||
namespaceSelector?: #labelSelector
|
||||
}
|
||||
|
||||
#nodeSelecor: {
|
||||
key: string
|
||||
operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" | "Gt" | "Lt"
|
||||
values?: [...string]
|
||||
}
|
||||
|
||||
#nodeSelectorTerm: {
|
||||
matchExpressions?: [...#nodeSelecor]
|
||||
matchFields?: [...#nodeSelecor]
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the pod affinity scheduling rules
|
||||
podAffinity?: {
|
||||
// +usage=Specify the required during scheduling ignored during execution
|
||||
required?: [...#podAffinityTerm]
|
||||
// +usage=Specify the preferred during scheduling ignored during execution
|
||||
preferred?: [...{
|
||||
// +usage=Specify weight associated with matching the corresponding podAffinityTerm
|
||||
weight: int & >=1 & <=100
|
||||
// +usage=Specify a set of pods
|
||||
podAffinityTerm: #podAffinityTerm
|
||||
}]
|
||||
}
|
||||
// +usage=Specify the pod anti-affinity scheduling rules
|
||||
podAntiAffinity?: {
|
||||
// +usage=Specify the required during scheduling ignored during execution
|
||||
required?: [...#podAffinityTerm]
|
||||
// +usage=Specify the preferred during scheduling ignored during execution
|
||||
preferred?: [...{
|
||||
// +usage=Specify weight associated with matching the corresponding podAffinityTerm
|
||||
weight: int & >=1 & <=100
|
||||
// +usage=Specify a set of pods
|
||||
podAffinityTerm: #podAffinityTerm
|
||||
}]
|
||||
}
|
||||
// +usage=Specify the node affinity scheduling rules for the pod
|
||||
nodeAffinity?: {
|
||||
// +usage=Specify the required during scheduling ignored during execution
|
||||
required?: {
|
||||
// +usage=Specify a list of node selector
|
||||
nodeSelectorTerms: [...#nodeSelectorTerm]
|
||||
}
|
||||
// +usage=Specify the preferred during scheduling ignored during execution
|
||||
preferred?: [...{
|
||||
// +usage=Specify weight associated with matching the corresponding nodeSelector
|
||||
weight: int & >=1 & <=100
|
||||
// +usage=Specify a node selector
|
||||
preference: #nodeSelectorTerm
|
||||
}]
|
||||
}
|
||||
// +usage=Specify tolerant taint
|
||||
tolerations?: [...{
|
||||
key?: string
|
||||
operator: *"Equal" | "Exists"
|
||||
value?: string
|
||||
effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute"
|
||||
// +usage=Specify the period of time the toleration
|
||||
tolerationSeconds?: int
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/annotations.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add annotations on your workload. if it generates pod, add same annotations for generated pods.
|
||||
name: annotations
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
// +patchStrategy=jsonMergePatch
|
||||
patch: {
|
||||
metadata: annotations: {
|
||||
for k, v in parameter {
|
||||
(k): v
|
||||
}
|
||||
}
|
||||
if context.output.spec != _|_ && context.output.spec.template != _|_ {
|
||||
spec: template: metadata: annotations: {
|
||||
for k, v in parameter {
|
||||
(k): v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: [string]: string | null
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-application-in-parallel.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply components of an application in parallel for your workflow steps
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
custom.definition.oam.dev/scope: Application
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: apply-application-in-parallel
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: op.#ApplyApplicationInParallel & {}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-application.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply application for your workflow steps, it has no arguments, should be used for custom steps before or after application applied.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
custom.definition.oam.dev/scope: Application
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: apply-application
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
// apply application
|
||||
output: op.#ApplyApplication & {}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-component.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Apply a specific component and its corresponding traits in application
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: apply-component
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
parameter: {
|
||||
// +usage=Specify the component name to apply
|
||||
component: string
|
||||
// +usage=Specify the cluster
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-deployment.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply deployment with specified image and cmd.
|
||||
name: apply-deployment
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: op.#Apply & {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
metadata: {
|
||||
name: context.stepName
|
||||
namespace: context.namespace
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
name: context.stepName
|
||||
image: parameter.image
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: output.value.status.readyReplicas == parameter.replicas
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
replicas: *1 | int
|
||||
cluster: *"" | string
|
||||
cmd?: [...string]
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-object.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
|
||||
name: apply-object
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: parameter.value
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify Kubernetes native resource object to be applied
|
||||
value: {...}
|
||||
// +usage=The cluster you want to apply the resource to, default is the current control plane cluster
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-once.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: PolicyDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Allow configuration drift for applied resources, delivery the resource without continuously reconciliation.
|
||||
name: apply-once
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#ApplyOnceStrategy: {
|
||||
// +usage=When the strategy takes effect,e.g. onUpdate、onStateKeep
|
||||
affect?: string
|
||||
// +usage=Specify the path of the resource that allow configuration drift
|
||||
path: [...string]
|
||||
}
|
||||
|
||||
#ApplyOncePolicyRule: {
|
||||
// +usage=Specify how to select the targets of the rule
|
||||
selector?: #ResourcePolicyRuleSelector
|
||||
// +usage=Specify the strategy for configuring the resource level configuration drift behaviour
|
||||
strategy: #ApplyOnceStrategy
|
||||
}
|
||||
|
||||
#ResourcePolicyRuleSelector: {
|
||||
// +usage=Select resources by component names
|
||||
componentNames?: [...string]
|
||||
// +usage=Select resources by component types
|
||||
componentTypes?: [...string]
|
||||
// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
|
||||
oamTypes?: [...string]
|
||||
// +usage=Select resources by trait types
|
||||
traitTypes?: [...string]
|
||||
// +usage=Select resources by resource types (like Deployment)
|
||||
resourceTypes?: [...string]
|
||||
// +usage=Select resources by their names
|
||||
resourceNames?: [...string]
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Whether to enable apply-once for the whole application
|
||||
enable: *false | bool
|
||||
// +usage=Specify the rules for configuring apply-once policy in resource level
|
||||
rules?: [...#ApplyOncePolicyRule]
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-remaining.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply remaining components and traits
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
custom.definition.oam.dev/scope: Application
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: apply-remaining
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
// apply remaining components and traits
|
||||
apply: op.#ApplyRemaining & {
|
||||
parameter
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Declare the name of the component
|
||||
exceptions?: [...string]
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-terraform-config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform configuration in the step
|
||||
name: apply-terraform-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "terraform.core.oam.dev/v1beta2"
|
||||
kind: "Configuration"
|
||||
metadata: {
|
||||
name: "\(context.name)-\(context.stepName)"
|
||||
namespace: context.namespace
|
||||
}
|
||||
spec: {
|
||||
deleteResource: parameter.deleteResource
|
||||
variable: parameter.variable
|
||||
forceDelete: parameter.forceDelete
|
||||
if parameter.source.path != _|_ {
|
||||
path: parameter.source.path
|
||||
}
|
||||
if parameter.source.remote != _|_ {
|
||||
remote: parameter.source.remote
|
||||
}
|
||||
if parameter.source.hcl != _|_ {
|
||||
hcl: parameter.source.hcl
|
||||
}
|
||||
if parameter.providerRef != _|_ {
|
||||
providerRef: parameter.providerRef
|
||||
}
|
||||
if parameter.jobEnv != _|_ {
|
||||
jobEnv: parameter.jobEnv
|
||||
}
|
||||
if parameter.writeConnectionSecretToRef != _|_ {
|
||||
writeConnectionSecretToRef: parameter.writeConnectionSecretToRef
|
||||
}
|
||||
if parameter.region != _|_ {
|
||||
region: parameter.region
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
check: op.#ConditionalWait & {
|
||||
continue: apply.value.status != _|_ && apply.value.status.apply != _|_ && apply.value.status.apply.state == "Available"
|
||||
}
|
||||
parameter: {
|
||||
// +usage=specify the source of the terraform configuration
|
||||
source: close({
|
||||
// +usage=directly specify the hcl of the terraform configuration
|
||||
hcl: string
|
||||
}) | close({
|
||||
// +usage=specify the remote url of the terraform configuration
|
||||
remote: *"https://github.com/kubevela-contrib/terraform-modules.git" | string
|
||||
// +usage=specify the path of the terraform configuration
|
||||
path?: string
|
||||
})
|
||||
// +usage=whether to delete resource
|
||||
deleteResource: *true | bool
|
||||
// +usage=the variable in the configuration
|
||||
variable: {...}
|
||||
// +usage=this specifies the namespace and name of a secret to which any connection details for this managed resource should be written.
|
||||
writeConnectionSecretToRef?: {
|
||||
name: string
|
||||
namespace: *context.namespace | string
|
||||
}
|
||||
// +usage=providerRef specifies the reference to Provider
|
||||
providerRef?: {
|
||||
name: string
|
||||
namespace: *context.namespace | string
|
||||
}
|
||||
// +usage=region is cloud provider's region. It will override the region in the region field of providerRef
|
||||
region?: string
|
||||
// +usage=the envs for job
|
||||
jobEnv?: {...}
|
||||
// +usae=forceDelete will force delete Configuration no matter which state it is or whether it has provisioned some resources
|
||||
forceDelete: *false | bool
|
||||
}
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-terraform-provider.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform provider config
|
||||
name: apply-terraform-provider
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"strings"
|
||||
)
|
||||
|
||||
config: op.#CreateConfig & {
|
||||
name: "\(context.name)-\(context.stepName)"
|
||||
namespace: context.namespace
|
||||
template: "terraform-\(parameter.type)"
|
||||
config: {
|
||||
name: parameter.name
|
||||
if parameter.type == "alibaba" {
|
||||
ALICLOUD_ACCESS_KEY: parameter.accessKey
|
||||
ALICLOUD_SECRET_KEY: parameter.secretKey
|
||||
ALICLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "aws" {
|
||||
AWS_ACCESS_KEY_ID: parameter.accessKey
|
||||
AWS_SECRET_ACCESS_KEY: parameter.secretKey
|
||||
AWS_DEFAULT_REGION: parameter.region
|
||||
AWS_SESSION_TOKEN: parameter.token
|
||||
}
|
||||
if parameter.type == "azure" {
|
||||
ARM_CLIENT_ID: parameter.clientID
|
||||
ARM_CLIENT_SECRET: parameter.clientSecret
|
||||
ARM_SUBSCRIPTION_ID: parameter.subscriptionID
|
||||
ARM_TENANT_ID: parameter.tenantID
|
||||
}
|
||||
if parameter.type == "baidu" {
|
||||
BAIDUCLOUD_ACCESS_KEY: parameter.accessKey
|
||||
BAIDUCLOUD_SECRET_KEY: parameter.secretKey
|
||||
BAIDUCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ec" {
|
||||
EC_API_KEY: parameter.apiKey
|
||||
}
|
||||
if parameter.type == "gcp" {
|
||||
GOOGLE_CREDENTIALS: parameter.credentials
|
||||
GOOGLE_REGION: parameter.region
|
||||
GOOGLE_PROJECT: parameter.project
|
||||
}
|
||||
if parameter.type == "tencent" {
|
||||
TENCENTCLOUD_SECRET_ID: parameter.secretID
|
||||
TENCENTCLOUD_SECRET_KEY: parameter.secretKey
|
||||
TENCENTCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ucloud" {
|
||||
UCLOUD_PRIVATE_KEY: parameter.privateKey
|
||||
UCLOUD_PUBLIC_KEY: parameter.publicKey
|
||||
UCLOUD_PROJECT_ID: parameter.projectID
|
||||
UCLOUD_REGION: parameter.region
|
||||
}
|
||||
}
|
||||
}
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "terraform.core.oam.dev/v1beta1"
|
||||
kind: "Provider"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
check: op.#ConditionalWait & {
|
||||
if read.value.status != _|_ {
|
||||
continue: read.value.status.state == "ready"
|
||||
}
|
||||
if read.value.status == _|_ {
|
||||
continue: false
|
||||
}
|
||||
}
|
||||
providerBasic: {
|
||||
accessKey: string
|
||||
secretKey: string
|
||||
region: string
|
||||
}
|
||||
#AlibabaProvider: {
|
||||
providerBasic
|
||||
type: "alibaba"
|
||||
name: *"alibaba-provider" | string
|
||||
}
|
||||
#AWSProvider: {
|
||||
providerBasic
|
||||
token: *"" | string
|
||||
type: "aws"
|
||||
name: *"aws-provider" | string
|
||||
}
|
||||
#AzureProvider: {
|
||||
subscriptionID: string
|
||||
tenantID: string
|
||||
clientID: string
|
||||
clientSecret: string
|
||||
name: *"azure-provider" | string
|
||||
}
|
||||
#BaiduProvider: {
|
||||
providerBasic
|
||||
type: "baidu"
|
||||
name: *"baidu-provider" | string
|
||||
}
|
||||
#ECProvider: {
|
||||
type: "ec"
|
||||
apiKey: *"" | string
|
||||
name: *"ec-provider" | string
|
||||
}
|
||||
#GCPProvider: {
|
||||
credentials: string
|
||||
region: string
|
||||
project: string
|
||||
type: "gcp"
|
||||
name: *"gcp-provider" | string
|
||||
}
|
||||
#TencentProvider: {
|
||||
secretID: string
|
||||
secretKey: string
|
||||
region: string
|
||||
type: "tencent"
|
||||
name: *"tencent-provider" | string
|
||||
}
|
||||
#UCloudProvider: {
|
||||
publicKey: string
|
||||
privateKey: string
|
||||
projectID: string
|
||||
region: string
|
||||
type: "ucloud"
|
||||
name: *"ucloud-provider" | string
|
||||
}
|
||||
parameter: *#AlibabaProvider | #AWSProvider | #AzureProvider | #BaiduProvider | #ECProvider | #GCPProvider | #TencentProvider | #UCloudProvider
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/bind-cloud-resource.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters
|
||||
name: bind-cloud-resource
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
app: op.#BindCloudResource & {
|
||||
env: parameter.env
|
||||
policy: parameter.policy
|
||||
placements: parameter.placements
|
||||
// context.namespace indicates the namespace of the app
|
||||
namespace: context.namespace
|
||||
// context.namespace indicates the name of the app
|
||||
name: context.name
|
||||
}
|
||||
parameter: {
|
||||
env: string
|
||||
// +usage=Declare the location to bind
|
||||
placements: [...{
|
||||
namespace?: string
|
||||
cluster?: string
|
||||
}]
|
||||
// +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used
|
||||
policy: *"" | string
|
||||
// +usage=Declare the name of the env in policy
|
||||
env: string
|
||||
}
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/build-push-image.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: CI Integration
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Build and push image from git url
|
||||
name: build-push-image
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
)
|
||||
|
||||
url: {
|
||||
if parameter.context.git != _|_ {
|
||||
address: strings.TrimPrefix(parameter.context.git, "git://")
|
||||
value: "git://\(address)#refs/heads/\(parameter.context.branch)"
|
||||
}
|
||||
if parameter.context.git == _|_ {
|
||||
value: parameter.context
|
||||
}
|
||||
}
|
||||
kaniko: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Pod"
|
||||
metadata: {
|
||||
name: "\(context.name)-\(context.stepSessionID)-kaniko"
|
||||
namespace: context.namespace
|
||||
}
|
||||
spec: {
|
||||
containers: [
|
||||
{
|
||||
args: [
|
||||
"--dockerfile=\(parameter.dockerfile)",
|
||||
"--context=\(url.value)",
|
||||
"--destination=\(parameter.image)",
|
||||
"--verbosity=\(parameter.verbosity)",
|
||||
if parameter.platform != _|_ {
|
||||
"--customPlatform=\(parameter.platform)"
|
||||
},
|
||||
if parameter.buildArgs != _|_ for arg in parameter.buildArgs {
|
||||
"--build-arg=\(arg)"
|
||||
},
|
||||
]
|
||||
image: parameter.kanikoExecutor
|
||||
name: "kaniko"
|
||||
if parameter.credentials != _|_ && parameter.credentials.image != _|_ {
|
||||
volumeMounts: [
|
||||
{
|
||||
mountPath: "/kaniko/.docker/"
|
||||
name: parameter.credentials.image.name
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.credentials != _|_ && parameter.credentials.git != _|_ {
|
||||
env: [
|
||||
{
|
||||
name: "GIT_TOKEN"
|
||||
valueFrom: secretKeyRef: {
|
||||
key: parameter.credentials.git.key
|
||||
name: parameter.credentials.git.name
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
if parameter.credentials != _|_ && parameter.credentials.image != _|_ {
|
||||
volumes: [
|
||||
{
|
||||
name: parameter.credentials.image.name
|
||||
secret: {
|
||||
defaultMode: 420
|
||||
items: [
|
||||
{
|
||||
key: parameter.credentials.image.key
|
||||
path: "config.json"
|
||||
},
|
||||
]
|
||||
secretName: parameter.credentials.image.name
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
restartPolicy: "Never"
|
||||
}
|
||||
}
|
||||
}
|
||||
log: op.#Log & {
|
||||
source: resources: [{
|
||||
name: "\(context.name)-\(context.stepSessionID)-kaniko"
|
||||
namespace: context.namespace
|
||||
}]
|
||||
}
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Pod"
|
||||
metadata: {
|
||||
name: "\(context.name)-\(context.stepSessionID)-kaniko"
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: read.value.status != _|_ && read.value.status.phase == "Succeeded"
|
||||
}
|
||||
#secret: {
|
||||
name: string
|
||||
key: string
|
||||
}
|
||||
#git: {
|
||||
git: string
|
||||
branch: *"master" | string
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the kaniko executor image, default to oamdev/kaniko-executor:v1.9.1
|
||||
kanikoExecutor: *"oamdev/kaniko-executor:v1.9.1" | string
|
||||
// +usage=Specify the context to build image, you can use context with git and branch or directly specify the context, please refer to https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts
|
||||
context: #git | string
|
||||
// +usage=Specify the dockerfile
|
||||
dockerfile: *"./Dockerfile" | string
|
||||
// +usage=Specify the image
|
||||
image: string
|
||||
// +usage=Specify the platform to build
|
||||
platform?: string
|
||||
// +usage=Specify the build args
|
||||
buildArgs?: [...string]
|
||||
// +usage=Specify the credentials to access git and image registry
|
||||
credentials?: {
|
||||
// +usage=Specify the credentials to access git
|
||||
git?: {
|
||||
// +usage=Specify the secret name
|
||||
name: string
|
||||
// +usage=Specify the secret key
|
||||
key: string
|
||||
}
|
||||
// +usage=Specify the credentials to access image registry
|
||||
image?: {
|
||||
// +usage=Specify the secret name
|
||||
name: string
|
||||
// +usage=Specify the secret key
|
||||
key: *".dockerconfigjson" | string
|
||||
}
|
||||
}
|
||||
// +usage=Specify the verbosity level
|
||||
verbosity: *"info" | "panic" | "fatal" | "error" | "warn" | "debug" | "trace"
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/check-metrics.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Verify application's metrics
|
||||
labels:
|
||||
custom.definition.oam.dev/catalog: Delivery
|
||||
name: check-metrics
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
check: op.#PromCheck & {
|
||||
query: parameter.query
|
||||
metricEndpoint: parameter.metricEndpoint
|
||||
condition: parameter.condition
|
||||
stepID: context.stepSessionID
|
||||
duration: parameter.duration
|
||||
failDuration: parameter.failDuration
|
||||
}
|
||||
|
||||
fail: op.#Steps & {
|
||||
if check.failed != _|_ {
|
||||
if check.failed == true {
|
||||
breakWorkflow: op.#Fail & {
|
||||
message: check.message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: check.result
|
||||
if check.message != _|_ {
|
||||
message: check.message
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Query is a raw prometheus query to perform
|
||||
query: string
|
||||
// +usage=The HTTP address and port of the prometheus server
|
||||
metricEndpoint?: "http://prometheus-server.o11y-system.svc:9090" | string
|
||||
// +usage=Condition is an expression which determines if a measurement is considered successful. eg: >=0.95
|
||||
condition: string
|
||||
// +usage=Duration defines the duration of time required for this step to be considered successful.
|
||||
duration?: *"5m" | string
|
||||
// +usage=FailDuration is the duration of time that, if the check fails, will result in the step being marked as failed.
|
||||
failDuration?: *"2m" | string
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/clean-jobs.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: clean applied jobs in the cluster
|
||||
name: clean-jobs
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
labelselector?: {...}
|
||||
namespace: *context.namespace | string
|
||||
}
|
||||
|
||||
cleanJobs: op.#Delete & {
|
||||
value: {
|
||||
apiVersion: "batch/v1"
|
||||
kind: "Job"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanPods: op.#Delete & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "pod"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/collect-service-endpoints.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Collect service endpoints for the application.
|
||||
name: collect-service-endpoints
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"vela/ql"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
collect: ql.#CollectServiceEndpoints & {
|
||||
app: {
|
||||
name: *context.name | string
|
||||
namespace: *context.namespace | string
|
||||
if parameter.name != _|_ {
|
||||
name: parameter.name
|
||||
}
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
filter: {
|
||||
if parameter.components != _|_ {
|
||||
components: parameter.components
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
|
||||
outputs: {
|
||||
eps_port_name_filtered: *[] | [...]
|
||||
if parameter.portName == _|_ {
|
||||
eps_port_name_filtered: collect.list
|
||||
}
|
||||
if parameter.portName != _|_ {
|
||||
eps_port_name_filtered: [ for ep in collect.list if parameter.portName == ep.endpoint.portName {ep}]
|
||||
}
|
||||
|
||||
eps_port_filtered: *[] | [...]
|
||||
if parameter.port == _|_ {
|
||||
eps_port_filtered: eps_port_name_filtered
|
||||
}
|
||||
if parameter.port != _|_ {
|
||||
eps_port_filtered: [ for ep in eps_port_name_filtered if parameter.port == ep.endpoint.port {ep}]
|
||||
}
|
||||
eps: eps_port_filtered
|
||||
endpoints: *[] | [...]
|
||||
if parameter.outer != _|_ {
|
||||
tmps: [ for ep in eps {
|
||||
ep
|
||||
if ep.endpoint.inner == _|_ {
|
||||
outer: true
|
||||
}
|
||||
if ep.endpoint.inner != _|_ {
|
||||
outer: !ep.endpoint.inner
|
||||
}
|
||||
}]
|
||||
endpoints: [ for ep in tmps if (!parameter.outer || ep.outer) {ep}]
|
||||
}
|
||||
if parameter.outer == _|_ {
|
||||
endpoints: eps_port_filtered
|
||||
}
|
||||
}
|
||||
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: len(outputs.endpoints) > 0
|
||||
} @step(2)
|
||||
|
||||
value: {
|
||||
if len(outputs.endpoints) > 0 {
|
||||
endpoint: outputs.endpoints[0].endpoint
|
||||
_portStr: strconv.FormatInt(endpoint.port, 10)
|
||||
url: "\(parameter.protocal)://\(endpoint.host):\(_portStr)"
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the application
|
||||
name?: string
|
||||
// +usage=Specify the namespace of the application
|
||||
namespace?: string
|
||||
// +usage=Filter the component of the endpoints
|
||||
components?: [...string]
|
||||
// +usage=Filter the port of the endpoints
|
||||
port?: int
|
||||
// +usage=Filter the port name of the endpoints
|
||||
portName?: string
|
||||
// +usage=Filter the endpoint that are only outer
|
||||
outer?: bool
|
||||
// +usage=The protocal of endpoint url
|
||||
protocal: *"http" | "https"
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/command.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add command on K8s pod for your workload which follows the pod spec in path 'spec.template'
|
||||
name: command
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#PatchParams: {
|
||||
// +usage=Specify the name of the target container, if not set, use the component name
|
||||
containerName: *"" | string
|
||||
// +usage=Specify the command to use in the target container, if not set, it will not be changed
|
||||
command: *null | [...string]
|
||||
// +usage=Specify the args to use in the target container, if set, it will override existing args
|
||||
args: *null | [...string]
|
||||
// +usage=Specify the args to add in the target container, existing args will be kept, cannot be used with `args`
|
||||
addArgs: *null | [...string]
|
||||
// +usage=Specify the existing args to delete in the target container, cannot be used with `args`
|
||||
delArgs: *null | [...string]
|
||||
}
|
||||
PatchContainer: {
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
}
|
||||
if len(_matchContainers_) > 0 {
|
||||
_baseContainer: _matchContainers_[0]
|
||||
if _params.command != null {
|
||||
// +patchStrategy=replace
|
||||
command: _params.command
|
||||
}
|
||||
if (_params.addArgs != null || _params.delArgs != null) && _params.args != null {
|
||||
err: "cannot set addArgs/delArgs and args at the same time"
|
||||
}
|
||||
_delArgs: {...}
|
||||
if _params.delArgs != null {
|
||||
_delArgs: {for k in _params.delArgs {(k): ""}}
|
||||
}
|
||||
if _params.delArgs == null {
|
||||
_delArgs: {}
|
||||
}
|
||||
_args: [...string]
|
||||
if _params.args != null {
|
||||
_args: _params.args
|
||||
}
|
||||
if _params.args == null && _baseContainer.args != _|_ {
|
||||
_args: _baseContainer.args
|
||||
}
|
||||
if _params.args == null && _baseContainer.args == _|_ {
|
||||
_args: []
|
||||
}
|
||||
_argsMap: {for a in _args {(a): ""}}
|
||||
_addArgs: [...string]
|
||||
if _params.addArgs != null {
|
||||
_addArgs: _params.addArgs
|
||||
}
|
||||
if _params.addArgs == null {
|
||||
_addArgs: []
|
||||
}
|
||||
|
||||
// +patchStrategy=replace
|
||||
args: [ for a in _args if _delArgs[a] == _|_ {a}] + [ for a in _addArgs if _delArgs[a] == _|_ && _argsMap[a] == _|_ {a}]
|
||||
}
|
||||
}
|
||||
// +patchStrategy=open
|
||||
patch: spec: template: spec: {
|
||||
if parameter.containers == _|_ {
|
||||
// +patchKey=name
|
||||
containers: [{
|
||||
PatchContainer & {_params: {
|
||||
if parameter.containerName == "" {
|
||||
containerName: context.name
|
||||
}
|
||||
if parameter.containerName != "" {
|
||||
containerName: parameter.containerName
|
||||
}
|
||||
command: parameter.command
|
||||
args: parameter.args
|
||||
addArgs: parameter.addArgs
|
||||
delArgs: parameter.delArgs
|
||||
}}
|
||||
}]
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "container name must be set for containers"
|
||||
}
|
||||
if c.containerName != "" {
|
||||
PatchContainer & {_params: c}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
parameter: *#PatchParams | close({
|
||||
// +usage=Specify the commands for multiple containers
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/config-image-registry.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
alias.config.oam.dev: Image Registry
|
||||
definition.oam.dev/description: Config information to authenticate image registry
|
||||
labels:
|
||||
catalog.config.oam.dev: velacore-config
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
multi-cluster.config.oam.dev: "true"
|
||||
type.config.oam.dev: image-registry
|
||||
name: config-image-registry
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
output: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: context.namespace
|
||||
labels: {
|
||||
"config.oam.dev/catalog": "velacore-config"
|
||||
"config.oam.dev/type": "image-registry"
|
||||
"config.oam.dev/multi-cluster": "true"
|
||||
"config.oam.dev/identifier": parameter.registry
|
||||
"config.oam.dev/sub-type": "auth"
|
||||
}
|
||||
}
|
||||
if parameter.auth != _|_ {
|
||||
type: "kubernetes.io/dockerconfigjson"
|
||||
}
|
||||
if parameter.auth == _|_ {
|
||||
type: "Opaque"
|
||||
}
|
||||
stringData: {
|
||||
if parameter.auth != _|_ && parameter.auth.username != _|_ {
|
||||
".dockerconfigjson": json.Marshal({
|
||||
auths: (parameter.registry): {
|
||||
username: parameter.auth.username
|
||||
password: parameter.auth.password
|
||||
if parameter.auth.email != _|_ {
|
||||
email: parameter.auth.email
|
||||
}
|
||||
auth: base64.Encode(null, (parameter.auth.username + ":" + parameter.auth.password))
|
||||
}
|
||||
})
|
||||
}
|
||||
if parameter.insecure != _|_ {
|
||||
"insecure-skip-verify": strconv.FormatBool(parameter.insecure)
|
||||
}
|
||||
if parameter.useHTTP != _|_ {
|
||||
"protocol-use-http": strconv.FormatBool(parameter.useHTTP)
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Image registry FQDN, such as: index.docker.io
|
||||
registry: string
|
||||
// +usage=Authenticate the image registry
|
||||
auth?: {
|
||||
// +usage=Private Image registry username
|
||||
username: string
|
||||
// +usage=Private Image registry password
|
||||
password: string
|
||||
// +usage=Private Image registry email
|
||||
email?: string
|
||||
}
|
||||
// +usage=For the registry server that uses the self-signed certificate
|
||||
insecure?: bool
|
||||
// +usage=For the registry server that uses the HTTP protocol
|
||||
useHTTP?: bool
|
||||
}
|
||||
workload:
|
||||
type: autodetects.core.oam.dev
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/configmap.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Create/Attach configmaps on K8s pod for your workload which follows the pod spec in path 'spec.template'. This definition is DEPRECATED, please specify configmap in 'storage' instead.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
name: configmap
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: {
|
||||
containers: [{
|
||||
// +patchKey=name
|
||||
volumeMounts: [
|
||||
for v in parameter.volumes {
|
||||
{
|
||||
name: "volume-\(v.name)"
|
||||
mountPath: v.mountPath
|
||||
readOnly: v.readOnly
|
||||
}
|
||||
},
|
||||
]
|
||||
}, ...]
|
||||
// +patchKey=name
|
||||
volumes: [
|
||||
for v in parameter.volumes {
|
||||
{
|
||||
name: "volume-\(v.name)"
|
||||
configMap: name: v.name
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
outputs: {
|
||||
for v in parameter.volumes {
|
||||
if v.data != _|_ {
|
||||
"\(v.name)": {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: name: v.name
|
||||
data: v.data
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify mounted configmap names and their mount paths in the container
|
||||
volumes: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
readOnly: *false | bool
|
||||
data?: [string]: string
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/container-image.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Set the image of the container.
|
||||
name: container-image
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#PatchParams: {
|
||||
// +usage=Specify the name of the target container, if not set, use the component name
|
||||
containerName: *"" | string
|
||||
// +usage=Specify the image of the container
|
||||
image: string
|
||||
// +usage=Specify the image pull policy of the container
|
||||
imagePullPolicy: *"" | "IfNotPresent" | "Always" | "Never"
|
||||
}
|
||||
PatchContainer: {
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
}
|
||||
if len(_matchContainers_) > 0 {
|
||||
// +patchStrategy=retainKeys
|
||||
image: _params.image
|
||||
|
||||
if _params.imagePullPolicy != "" {
|
||||
// +patchStrategy=retainKeys
|
||||
imagePullPolicy: _params.imagePullPolicy
|
||||
}
|
||||
}
|
||||
}
|
||||
patch: spec: template: spec: {
|
||||
if parameter.containers == _|_ {
|
||||
// +patchKey=name
|
||||
containers: [{
|
||||
PatchContainer & {_params: {
|
||||
if parameter.containerName == "" {
|
||||
containerName: context.name
|
||||
}
|
||||
if parameter.containerName != "" {
|
||||
containerName: parameter.containerName
|
||||
}
|
||||
image: parameter.image
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
}}
|
||||
}]
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "containerName must be set for containers"
|
||||
}
|
||||
if c.containerName != "" {
|
||||
PatchContainer & {_params: c}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
parameter: #PatchParams | close({
|
||||
// +usage=Specify the container image for multiple containers
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/cpuscaler.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Automatically scale the component based on CPU usage.
|
||||
name: cpuscaler
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
outputs: cpuscaler: {
|
||||
apiVersion: "autoscaling/v1"
|
||||
kind: "HorizontalPodAutoscaler"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
scaleTargetRef: {
|
||||
apiVersion: parameter.targetAPIVersion
|
||||
kind: parameter.targetKind
|
||||
name: context.name
|
||||
}
|
||||
minReplicas: parameter.min
|
||||
maxReplicas: parameter.max
|
||||
targetCPUUtilizationPercentage: parameter.cpuUtil
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the minimal number of replicas to which the autoscaler can scale down
|
||||
min: *1 | int
|
||||
// +usage=Specify the maximum number of of replicas to which the autoscaler can scale up
|
||||
max: *10 | int
|
||||
// +usage=Specify the average CPU utilization, for example, 50 means the CPU usage is 50%
|
||||
cpuUtil: *50 | int
|
||||
// +usage=Specify the apiVersion of scale target
|
||||
targetAPIVersion: *"apps/v1" | string
|
||||
// +usage=Specify the kind of scale target
|
||||
targetKind: *"Deployment" | string
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/create-config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Create or update a config
|
||||
name: create-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
deploy: op.#CreateConfig & {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
if parameter.template != _|_ {
|
||||
template: parameter.template
|
||||
}
|
||||
config: parameter.config
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the name of the config.
|
||||
name: string
|
||||
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace?: string
|
||||
|
||||
//+usage=Specify the template of the config.
|
||||
template?: string
|
||||
|
||||
//+usage=Specify the content of the config.
|
||||
config: {...}
|
||||
}
|
||||
|
||||
@@ -1,324 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/cron-task.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Describes cron jobs that run code or a script to completion.
|
||||
name: cron-task
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: {
|
||||
if context.clusterVersion.minor < 25 {
|
||||
apiVersion: "batch/v1beta1"
|
||||
}
|
||||
if context.clusterVersion.minor >= 25 {
|
||||
apiVersion: "batch/v1"
|
||||
}
|
||||
kind: "CronJob"
|
||||
spec: {
|
||||
schedule: parameter.schedule
|
||||
concurrencyPolicy: parameter.concurrencyPolicy
|
||||
suspend: parameter.suspend
|
||||
successfulJobsHistoryLimit: parameter.successfulJobsHistoryLimit
|
||||
failedJobsHistoryLimit: parameter.failedJobsHistoryLimit
|
||||
if parameter.startingDeadlineSeconds != _|_ {
|
||||
startingDeadlineSeconds: parameter.startingDeadlineSeconds
|
||||
}
|
||||
jobTemplate: {
|
||||
metadata: {
|
||||
labels: {
|
||||
if parameter.labels != _|_ {
|
||||
parameter.labels
|
||||
}
|
||||
"app.oam.dev/name": context.appName
|
||||
"app.oam.dev/component": context.name
|
||||
}
|
||||
if parameter.annotations != _|_ {
|
||||
annotations: parameter.annotations
|
||||
}
|
||||
}
|
||||
spec: {
|
||||
parallelism: parameter.count
|
||||
completions: parameter.count
|
||||
if parameter.ttlSecondsAfterFinished != _|_ {
|
||||
ttlSecondsAfterFinished: parameter.ttlSecondsAfterFinished
|
||||
}
|
||||
if parameter.activeDeadlineSeconds != _|_ {
|
||||
activeDeadlineSeconds: parameter.activeDeadlineSeconds
|
||||
}
|
||||
backoffLimit: parameter.backoffLimit
|
||||
template: {
|
||||
metadata: {
|
||||
labels: {
|
||||
if parameter.labels != _|_ {
|
||||
parameter.labels
|
||||
}
|
||||
"app.oam.dev/name": context.appName
|
||||
"app.oam.dev/component": context.name
|
||||
}
|
||||
if parameter.annotations != _|_ {
|
||||
annotations: parameter.annotations
|
||||
}
|
||||
}
|
||||
spec: {
|
||||
restartPolicy: parameter.restart
|
||||
containers: [{
|
||||
name: context.name
|
||||
image: parameter.image
|
||||
if parameter["imagePullPolicy"] != _|_ {
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
}
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
if parameter["env"] != _|_ {
|
||||
env: parameter.env
|
||||
}
|
||||
if parameter["cpu"] != _|_ {
|
||||
resources: {
|
||||
limits: cpu: parameter.cpu
|
||||
requests: cpu: parameter.cpu
|
||||
}
|
||||
}
|
||||
if parameter["memory"] != _|_ {
|
||||
resources: {
|
||||
limits: memory: parameter.memory
|
||||
requests: memory: parameter.memory
|
||||
}
|
||||
}
|
||||
if parameter["volumes"] != _|_ {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
}}]
|
||||
}
|
||||
}]
|
||||
if parameter["volumes"] != _|_ {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
persistentVolumeClaim: claimName: v.claimName
|
||||
}
|
||||
if v.type == "configMap" {
|
||||
configMap: {
|
||||
defaultMode: v.defaultMode
|
||||
name: v.cmName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
if v.type == "secret" {
|
||||
secret: {
|
||||
defaultMode: v.defaultMode
|
||||
secretName: v.secretName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
if v.type == "emptyDir" {
|
||||
emptyDir: medium: v.medium
|
||||
}
|
||||
}}]
|
||||
}
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.hostAliases != _|_ {
|
||||
hostAliases: [ for v in parameter.hostAliases {
|
||||
ip: v.ip
|
||||
hostnames: v.hostnames
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the labels in the workload
|
||||
labels?: [string]: string
|
||||
|
||||
// +usage=Specify the annotations in the workload
|
||||
annotations?: [string]: string
|
||||
|
||||
// +usage=Specify the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron
|
||||
schedule: string
|
||||
|
||||
// +usage=Specify deadline in seconds for starting the job if it misses scheduled
|
||||
startingDeadlineSeconds?: int
|
||||
|
||||
// +usage=suspend subsequent executions
|
||||
suspend: *false | bool
|
||||
|
||||
// +usage=Specifies how to treat concurrent executions of a Job
|
||||
concurrencyPolicy: *"Allow" | "Allow" | "Forbid" | "Replace"
|
||||
|
||||
// +usage=The number of successful finished jobs to retain
|
||||
successfulJobsHistoryLimit: *3 | int
|
||||
|
||||
// +usage=The number of failed finished jobs to retain
|
||||
failedJobsHistoryLimit: *1 | int
|
||||
|
||||
// +usage=Specify number of tasks to run in parallel
|
||||
// +short=c
|
||||
count: *1 | int
|
||||
|
||||
// +usage=Which image would you like to use for your service
|
||||
// +short=i
|
||||
image: string
|
||||
|
||||
// +usage=Specify image pull policy for your service
|
||||
imagePullPolicy?: "Always" | "Never" | "IfNotPresent"
|
||||
|
||||
// +usage=Specify image pull secrets for your service
|
||||
imagePullSecrets?: [...string]
|
||||
|
||||
// +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never.
|
||||
restart: *"Never" | string
|
||||
|
||||
// +usage=Commands to run in the container
|
||||
cmd?: [...string]
|
||||
|
||||
// +usage=Define arguments by using environment variables
|
||||
env?: [...{
|
||||
// +usage=Environment variable name
|
||||
name: string
|
||||
// +usage=The value of the environment variable
|
||||
value?: string
|
||||
// +usage=Specifies a source the value of this var should come from
|
||||
valueFrom?: {
|
||||
// +usage=Selects a key of a secret in the pod's namespace
|
||||
secretKeyRef?: {
|
||||
// +usage=The name of the secret in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the secret to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
// +usage=Selects a key of a config map in the pod's namespace
|
||||
configMapKeyRef?: {
|
||||
// +usage=The name of the config map in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the config map to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)
|
||||
cpu?: string
|
||||
|
||||
// +usage=Specifies the attributes of the memory resource required for the container.
|
||||
memory?: string
|
||||
|
||||
// +usage=Declare volumes and volumeMounts
|
||||
volumes?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
// +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", default to emptyDir
|
||||
type: *"emptyDir" | "pvc" | "configMap" | "secret"
|
||||
if type == "pvc" {
|
||||
claimName: string
|
||||
}
|
||||
if type == "configMap" {
|
||||
defaultMode: *420 | int
|
||||
cmName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}
|
||||
if type == "secret" {
|
||||
defaultMode: *420 | int
|
||||
secretName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}
|
||||
if type == "emptyDir" {
|
||||
medium: *"" | "Memory"
|
||||
}
|
||||
}]
|
||||
|
||||
// +usage=An optional list of hosts and IPs that will be injected into the pod's hosts file
|
||||
hostAliases?: [...{
|
||||
ip: string
|
||||
hostnames: [...string]
|
||||
}]
|
||||
|
||||
// +usage=Limits the lifetime of a Job that has finished
|
||||
ttlSecondsAfterFinished?: int
|
||||
|
||||
// +usage=The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it
|
||||
activeDeadlineSeconds?: int
|
||||
|
||||
// +usage=The number of retries before marking this job failed
|
||||
backoffLimit: *6 | int
|
||||
|
||||
// +usage=Instructions for assessing whether the container is alive.
|
||||
livenessProbe?: #HealthProbe
|
||||
|
||||
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
|
||||
readinessProbe?: #HealthProbe
|
||||
}
|
||||
|
||||
#HealthProbe: {
|
||||
|
||||
// +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.
|
||||
exec?: {
|
||||
// +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.
|
||||
command: [...string]
|
||||
}
|
||||
|
||||
// +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.
|
||||
httpGet?: {
|
||||
// +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed.
|
||||
path: string
|
||||
// +usage=The TCP socket within the container to which the HTTP GET request should be directed.
|
||||
port: int
|
||||
httpHeaders?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
}
|
||||
|
||||
// +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.
|
||||
tcpSocket?: {
|
||||
// +usage=The TCP socket within the container that should be probed to assess container health.
|
||||
port: int
|
||||
}
|
||||
|
||||
// +usage=Number of seconds after the container is started before the first probe is initiated.
|
||||
initialDelaySeconds: *0 | int
|
||||
|
||||
// +usage=How often, in seconds, to execute the probe.
|
||||
periodSeconds: *10 | int
|
||||
|
||||
// +usage=Number of seconds after which the probe times out.
|
||||
timeoutSeconds: *1 | int
|
||||
|
||||
// +usage=Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
successThreshold: *1 | int
|
||||
|
||||
// +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).
|
||||
failureThreshold: *3 | int
|
||||
}
|
||||
workload:
|
||||
type: autodetects.core.oam.dev
|
||||
|
||||
@@ -1,582 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/daemon.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Describes daemonset services in Kubernetes.
|
||||
name: daemon
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
mountsArray: [
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
subPath: v.subPath
|
||||
}
|
||||
name: v.name
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
subPath: v.subPath
|
||||
}
|
||||
name: v.name
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
subPath: v.subPath
|
||||
}
|
||||
name: v.name
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
subPath: v.subPath
|
||||
}
|
||||
name: v.name
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
subPath: v.subPath
|
||||
}
|
||||
name: v.name
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
volumesList: [
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc {
|
||||
{
|
||||
name: v.name
|
||||
persistentVolumeClaim: claimName: v.claimName
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap {
|
||||
{
|
||||
name: v.name
|
||||
configMap: {
|
||||
defaultMode: v.defaultMode
|
||||
name: v.cmName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret {
|
||||
{
|
||||
name: v.name
|
||||
secret: {
|
||||
defaultMode: v.defaultMode
|
||||
secretName: v.secretName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir {
|
||||
{
|
||||
name: v.name
|
||||
emptyDir: medium: v.medium
|
||||
}
|
||||
},
|
||||
|
||||
if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath {
|
||||
{
|
||||
name: v.name
|
||||
hostPath: path: v.path
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
deDupVolumesArray: [
|
||||
for val in [
|
||||
for i, vi in volumesList {
|
||||
for j, vj in volumesList if j < i && vi.name == vj.name {
|
||||
_ignore: true
|
||||
}
|
||||
vi
|
||||
},
|
||||
] if val._ignore == _|_ {
|
||||
val
|
||||
},
|
||||
]
|
||||
|
||||
output: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "DaemonSet"
|
||||
spec: {
|
||||
selector: matchLabels: "app.oam.dev/component": context.name
|
||||
|
||||
template: {
|
||||
metadata: {
|
||||
labels: {
|
||||
if parameter.labels != _|_ {
|
||||
parameter.labels
|
||||
}
|
||||
if parameter.addRevisionLabel {
|
||||
"app.oam.dev/revision": context.revision
|
||||
}
|
||||
"app.oam.dev/name": context.appName
|
||||
"app.oam.dev/component": context.name
|
||||
}
|
||||
if parameter.annotations != _|_ {
|
||||
annotations: parameter.annotations
|
||||
}
|
||||
}
|
||||
|
||||
spec: {
|
||||
containers: [{
|
||||
name: context.name
|
||||
image: parameter.image
|
||||
if parameter["port"] != _|_ && parameter["ports"] == _|_ {
|
||||
ports: [{
|
||||
containerPort: parameter.port
|
||||
}]
|
||||
}
|
||||
if parameter["ports"] != _|_ {
|
||||
ports: [ for v in parameter.ports {
|
||||
{
|
||||
containerPort: v.port
|
||||
protocol: v.protocol
|
||||
if v.name != _|_ {
|
||||
name: v.name
|
||||
}
|
||||
if v.name == _|_ {
|
||||
name: "port-" + strconv.FormatInt(v.port, 10)
|
||||
}
|
||||
}}]
|
||||
}
|
||||
|
||||
if parameter["imagePullPolicy"] != _|_ {
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
}
|
||||
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
|
||||
if parameter["env"] != _|_ {
|
||||
env: parameter.env
|
||||
}
|
||||
|
||||
if context["config"] != _|_ {
|
||||
env: context.config
|
||||
}
|
||||
|
||||
if parameter["cpu"] != _|_ {
|
||||
resources: {
|
||||
limits: cpu: parameter.cpu
|
||||
requests: cpu: parameter.cpu
|
||||
}
|
||||
}
|
||||
|
||||
if parameter["memory"] != _|_ {
|
||||
resources: {
|
||||
limits: memory: parameter.memory
|
||||
requests: memory: parameter.memory
|
||||
}
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
}}]
|
||||
}
|
||||
|
||||
if parameter["volumeMounts"] != _|_ {
|
||||
volumeMounts: mountsArray
|
||||
}
|
||||
|
||||
if parameter["livenessProbe"] != _|_ {
|
||||
livenessProbe: parameter.livenessProbe
|
||||
}
|
||||
|
||||
if parameter["readinessProbe"] != _|_ {
|
||||
readinessProbe: parameter.readinessProbe
|
||||
}
|
||||
|
||||
}]
|
||||
|
||||
if parameter["hostAliases"] != _|_ {
|
||||
// +patchKey=ip
|
||||
hostAliases: parameter.hostAliases
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
persistentVolumeClaim: claimName: v.claimName
|
||||
}
|
||||
if v.type == "configMap" {
|
||||
configMap: {
|
||||
defaultMode: v.defaultMode
|
||||
name: v.cmName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
if v.type == "secret" {
|
||||
secret: {
|
||||
defaultMode: v.defaultMode
|
||||
secretName: v.secretName
|
||||
if v.items != _|_ {
|
||||
items: v.items
|
||||
}
|
||||
}
|
||||
}
|
||||
if v.type == "emptyDir" {
|
||||
emptyDir: medium: v.medium
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
if parameter["volumeMounts"] != _|_ {
|
||||
volumes: deDupVolumesArray
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exposePorts: [
|
||||
if parameter.ports != _|_ for v in parameter.ports if v.expose == true {
|
||||
port: v.port
|
||||
targetPort: v.port
|
||||
if v.name != _|_ {
|
||||
name: v.name
|
||||
}
|
||||
if v.name == _|_ {
|
||||
name: "port-" + strconv.FormatInt(v.port, 10)
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
outputs: {
|
||||
if len(exposePorts) != 0 {
|
||||
webserviceExpose: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
ports: exposePorts
|
||||
type: parameter.exposeType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the labels in the workload
|
||||
labels?: [string]: string
|
||||
|
||||
// +usage=Specify the annotations in the workload
|
||||
annotations?: [string]: string
|
||||
|
||||
// +usage=Which image would you like to use for your service
|
||||
// +short=i
|
||||
image: string
|
||||
|
||||
// +usage=Specify image pull policy for your service
|
||||
imagePullPolicy?: "Always" | "Never" | "IfNotPresent"
|
||||
|
||||
// +usage=Specify image pull secrets for your service
|
||||
imagePullSecrets?: [...string]
|
||||
|
||||
// +ignore
|
||||
// +usage=Deprecated field, please use ports instead
|
||||
// +short=p
|
||||
port?: int
|
||||
|
||||
// +usage=Which ports do you want customer traffic sent to, defaults to 80
|
||||
ports?: [...{
|
||||
// +usage=Number of port to expose on the pod's IP address
|
||||
port: int
|
||||
// +usage=Name of the port
|
||||
name?: string
|
||||
// +usage=Protocol for port. Must be UDP, TCP, or SCTP
|
||||
protocol: *"TCP" | "UDP" | "SCTP"
|
||||
// +usage=Specify if the port should be exposed
|
||||
expose: *false | bool
|
||||
}]
|
||||
|
||||
// +ignore
|
||||
// +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer", "ExternalName"
|
||||
exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
|
||||
|
||||
// +ignore
|
||||
// +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods
|
||||
addRevisionLabel: *false | bool
|
||||
|
||||
// +usage=Commands to run in the container
|
||||
cmd?: [...string]
|
||||
|
||||
// +usage=Define arguments by using environment variables
|
||||
env?: [...{
|
||||
// +usage=Environment variable name
|
||||
name: string
|
||||
// +usage=The value of the environment variable
|
||||
value?: string
|
||||
// +usage=Specifies a source the value of this var should come from
|
||||
valueFrom?: {
|
||||
// +usage=Selects a key of a secret in the pod's namespace
|
||||
secretKeyRef?: {
|
||||
// +usage=The name of the secret in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the secret to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
// +usage=Selects a key of a config map in the pod's namespace
|
||||
configMapKeyRef?: {
|
||||
// +usage=The name of the config map in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the config map to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)
|
||||
cpu?: string
|
||||
|
||||
// +usage=Specifies the attributes of the memory resource required for the container.
|
||||
memory?: string
|
||||
|
||||
volumeMounts?: {
|
||||
// +usage=Mount PVC type volume
|
||||
pvc?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
// +usage=The name of the PVC
|
||||
claimName: string
|
||||
}]
|
||||
// +usage=Mount ConfigMap type volume
|
||||
configMap?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
defaultMode: *420 | int
|
||||
cmName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}]
|
||||
// +usage=Mount Secret type volume
|
||||
secret?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
defaultMode: *420 | int
|
||||
secretName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}]
|
||||
// +usage=Mount EmptyDir type volume
|
||||
emptyDir?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
medium: *"" | "Memory"
|
||||
}]
|
||||
// +usage=Mount HostPath type volume
|
||||
hostPath?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
mountPropagation?: "None" | "HostToContainer" | "Bidirectional"
|
||||
path: string
|
||||
readOnly?: bool
|
||||
}]
|
||||
}
|
||||
|
||||
// +usage=Deprecated field, use volumeMounts instead.
|
||||
volumes?: [...{
|
||||
name: string
|
||||
mountPath: string
|
||||
// +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", default to emptyDir
|
||||
type: *"emptyDir" | "pvc" | "configMap" | "secret"
|
||||
if type == "pvc" {
|
||||
claimName: string
|
||||
}
|
||||
if type == "configMap" {
|
||||
defaultMode: *420 | int
|
||||
cmName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}
|
||||
if type == "secret" {
|
||||
defaultMode: *420 | int
|
||||
secretName: string
|
||||
items?: [...{
|
||||
key: string
|
||||
path: string
|
||||
mode: *511 | int
|
||||
}]
|
||||
}
|
||||
if type == "emptyDir" {
|
||||
medium: *"" | "Memory"
|
||||
}
|
||||
}]
|
||||
|
||||
// +usage=Instructions for assessing whether the container is alive.
|
||||
livenessProbe?: #HealthProbe
|
||||
|
||||
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
|
||||
readinessProbe?: #HealthProbe
|
||||
|
||||
// +usage=Specify the hostAliases to add
|
||||
hostAliases?: [...{
|
||||
ip: string
|
||||
hostnames: [...string]
|
||||
}]
|
||||
}
|
||||
|
||||
#HealthProbe: {
|
||||
|
||||
// +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.
|
||||
exec?: {
|
||||
// +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.
|
||||
command: [...string]
|
||||
}
|
||||
|
||||
// +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.
|
||||
httpGet?: {
|
||||
// +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed.
|
||||
path: string
|
||||
// +usage=The TCP socket within the container to which the HTTP GET request should be directed.
|
||||
port: int
|
||||
host?: string
|
||||
scheme?: *"HTTP" | string
|
||||
httpHeaders?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
}
|
||||
|
||||
// +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.
|
||||
tcpSocket?: {
|
||||
// +usage=The TCP socket within the container that should be probed to assess container health.
|
||||
port: int
|
||||
}
|
||||
|
||||
// +usage=Number of seconds after the container is started before the first probe is initiated.
|
||||
initialDelaySeconds: *0 | int
|
||||
|
||||
// +usage=How often, in seconds, to execute the probe.
|
||||
periodSeconds: *10 | int
|
||||
|
||||
// +usage=Number of seconds after which the probe times out.
|
||||
timeoutSeconds: *1 | int
|
||||
|
||||
// +usage=Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
successThreshold: *1 | int
|
||||
|
||||
// +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).
|
||||
failureThreshold: *3 | int
|
||||
}
|
||||
status:
|
||||
customStatus: |-
|
||||
ready: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.numberReady != _|_ {
|
||||
replicas: context.output.status.numberReady
|
||||
}
|
||||
}
|
||||
desired: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.desiredNumberScheduled != _|_ {
|
||||
replicas: context.output.status.desiredNumberScheduled
|
||||
}
|
||||
}
|
||||
message: "Ready:\(ready.replicas)/\(desired.replicas)"
|
||||
healthPolicy: |-
|
||||
ready: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.numberReady != _|_ {
|
||||
replicas: context.output.status.numberReady
|
||||
}
|
||||
}
|
||||
desired: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.desiredNumberScheduled != _|_ {
|
||||
replicas: context.output.status.desiredNumberScheduled
|
||||
}
|
||||
}
|
||||
current: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.currentNumberScheduled != _|_ {
|
||||
replicas: context.output.status.currentNumberScheduled
|
||||
}
|
||||
}
|
||||
updated: {
|
||||
replicas: *0 | int
|
||||
} & {
|
||||
if context.output.status.updatedNumberScheduled != _|_ {
|
||||
replicas: context.output.status.updatedNumberScheduled
|
||||
}
|
||||
}
|
||||
generation: {
|
||||
metadata: context.output.metadata.generation
|
||||
observed: *0 | int
|
||||
} & {
|
||||
if context.output.status.observedGeneration != _|_ {
|
||||
observed: context.output.status.observedGeneration
|
||||
}
|
||||
}
|
||||
isHealth: (desired.replicas == ready.replicas) && (desired.replicas == updated.replicas) && (desired.replicas == current.replicas) && (generation.observed == generation.metadata || generation.observed > generation.metadata)
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
type: daemonsets.apps
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/delete-config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Delete a config
|
||||
name: delete-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
deploy: op.#DeleteConfig & {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the name of the config.
|
||||
name: string
|
||||
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/depends-on-app.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Wait for the specified Application to complete.
|
||||
name: depends-on-app
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/yaml"
|
||||
)
|
||||
|
||||
dependsOn: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
template: configMap.value.data["application"]
|
||||
apply: op.#Apply & {
|
||||
value: yaml.Unmarshal(template)
|
||||
} @step(2)
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: apply.value.status.status == "running"
|
||||
} @step(3)
|
||||
}
|
||||
|
||||
if dependsOn.err == _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the dependent Application
|
||||
name: string
|
||||
// +usage=Specify the namespace of the dependent Application
|
||||
namespace: string
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy-cloud-resource.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: deploy-cloud-resource
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
app: op.#DeployCloudResource & {
|
||||
env: parameter.env
|
||||
policy: parameter.policy
|
||||
// context.namespace indicates the namespace of the app
|
||||
namespace: context.namespace
|
||||
// context.namespace indicates the name of the app
|
||||
name: context.name
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used
|
||||
policy: *"" | string
|
||||
// +usage=Declare the name of the env in policy
|
||||
env: string
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: deploy
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
if parameter.auto == false {
|
||||
suspend: op.#Suspend & {message: "Waiting approval to the deploy step \"\(context.stepName)\""}
|
||||
}
|
||||
deploy: op.#Deploy & {
|
||||
policies: parameter.policies
|
||||
parallelism: parameter.parallelism
|
||||
ignoreTerraformComponent: parameter.ignoreTerraformComponent
|
||||
}
|
||||
parameter: {
|
||||
//+usage=If set to false, the workflow will suspend automatically before this step, default to be true.
|
||||
auto: *true | bool
|
||||
//+usage=Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster.
|
||||
policies: *[] | [...string]
|
||||
//+usage=Maximum number of concurrent delivered components.
|
||||
parallelism: *5 | int
|
||||
//+usage=If set false, this step will apply the components with the terraform workload.
|
||||
ignoreTerraformComponent: *true | bool
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy2runtime.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Deploy application to runtime clusters
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
custom.definition.oam.dev/scope: Application
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: deploy2runtime
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
app: op.#Steps & {
|
||||
load: op.#Load
|
||||
clusters: [...string]
|
||||
if parameter.clusters == _|_ {
|
||||
listClusters: op.#ListClusters
|
||||
clusters: listClusters.outputs.clusters
|
||||
}
|
||||
if parameter.clusters != _|_ {
|
||||
clusters: parameter.clusters
|
||||
}
|
||||
|
||||
apply: op.#Steps & {
|
||||
for _, cluster_ in clusters {
|
||||
for name, c in load.value {
|
||||
"\(cluster_)-\(name)": op.#ApplyComponent & {
|
||||
value: c
|
||||
cluster: cluster_
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Declare the runtime clusters to apply, if empty, all runtime clusters will be used
|
||||
clusters?: [...string]
|
||||
}
|
||||
|
||||
@@ -1,108 +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.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add env on K8s pod for your workload which follows the pod spec in path 'spec.template'
|
||||
name: env
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#PatchParams: {
|
||||
// +usage=Specify the name of the target container, if not set, use the component name
|
||||
containerName: *"" | string
|
||||
// +usage=Specify if replacing the whole environment settings for the container
|
||||
replace: *false | bool
|
||||
// +usage=Specify the environment variables to merge, if key already existing, override its value
|
||||
env: [string]: string
|
||||
// +usage=Specify which existing environment variables to unset
|
||||
unset: *[] | [...string]
|
||||
}
|
||||
PatchContainer: {
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_delKeys: {for k in _params.unset {(k): ""}}
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
}
|
||||
if len(_matchContainers_) > 0 {
|
||||
_baseContainer: _matchContainers_[0]
|
||||
_baseEnv: _baseContainer.env
|
||||
if _baseEnv == _|_ {
|
||||
// +patchStrategy=replace
|
||||
env: [ for k, v in _params.env if _delKeys[k] == _|_ {
|
||||
name: k
|
||||
value: v
|
||||
}]
|
||||
}
|
||||
if _baseEnv != _|_ {
|
||||
_baseEnvMap: {for envVar in _baseEnv {(envVar.name): envVar}}
|
||||
// +patchStrategy=replace
|
||||
env: [ for envVar in _baseEnv if _delKeys[envVar.name] == _|_ && !_params.replace {
|
||||
name: envVar.name
|
||||
if _params.env[envVar.name] != _|_ {
|
||||
value: _params.env[envVar.name]
|
||||
}
|
||||
if _params.env[envVar.name] == _|_ {
|
||||
if envVar.value != _|_ {
|
||||
value: envVar.value
|
||||
}
|
||||
if envVar.valueFrom != _|_ {
|
||||
valueFrom: envVar.valueFrom
|
||||
}
|
||||
}
|
||||
}] + [ for k, v in _params.env if _delKeys[k] == _|_ && (_params.replace || _baseEnvMap[k] == _|_) {
|
||||
name: k
|
||||
value: v
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
patch: spec: template: spec: {
|
||||
if parameter.containers == _|_ {
|
||||
// +patchKey=name
|
||||
containers: [{
|
||||
PatchContainer & {_params: {
|
||||
if parameter.containerName == "" {
|
||||
containerName: context.name
|
||||
}
|
||||
if parameter.containerName != "" {
|
||||
containerName: parameter.containerName
|
||||
}
|
||||
replace: parameter.replace
|
||||
env: parameter.env
|
||||
unset: parameter.unset
|
||||
}}
|
||||
}]
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "containerName must be set for containers"
|
||||
}
|
||||
if c.containerName != "" {
|
||||
PatchContainer & {_params: c}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
parameter: *#PatchParams | close({
|
||||
// +usage=Specify the environment variables for multiple containers
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export-data.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export data to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-data
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
object: {
|
||||
apiVersion: "v1"
|
||||
kind: parameter.kind
|
||||
metadata: {
|
||||
name: *context.name | string
|
||||
namespace: *context.namespace | string
|
||||
if parameter.name != _|_ {
|
||||
name: parameter.name
|
||||
}
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
if parameter.kind == "ConfigMap" {
|
||||
data: parameter.data
|
||||
}
|
||||
if parameter.kind == "Secret" {
|
||||
stringData: parameter.data
|
||||
}
|
||||
} @step(1)
|
||||
|
||||
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
|
||||
policies: *[] | [...string]
|
||||
if parameter.topology != _|_ {
|
||||
policies: [parameter.topology]
|
||||
}
|
||||
} @step(2)
|
||||
|
||||
apply: op.#Steps & {
|
||||
for p in getPlacements.placements {
|
||||
(p.cluster): op.#Apply & {
|
||||
value: object
|
||||
cluster: p.cluster
|
||||
}
|
||||
}
|
||||
} @step(3)
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the export destination
|
||||
name?: string
|
||||
// +usage=Specify the namespace of the export destination
|
||||
namespace?: string
|
||||
// +usage=Specify the kind of the export destination
|
||||
kind: *"ConfigMap" | "Secret"
|
||||
// +usage=Specify the data to export
|
||||
data: {}
|
||||
// +usage=Specify the topology to export
|
||||
topology?: string
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export-service.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export service to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-service
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
meta: {
|
||||
name: *context.name | string
|
||||
namespace: *context.namespace | string
|
||||
if parameter.name != _|_ {
|
||||
name: parameter.name
|
||||
}
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
objects: [{
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: meta
|
||||
spec: {
|
||||
type: "ClusterIP"
|
||||
ports: [{
|
||||
protocol: "TCP"
|
||||
port: parameter.port
|
||||
targetPort: parameter.targetPort
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
apiVersion: "v1"
|
||||
kind: "Endpoints"
|
||||
metadata: meta
|
||||
subsets: [{
|
||||
addresses: [{ip: parameter.ip}]
|
||||
ports: [{port: parameter.targetPort}]
|
||||
}]
|
||||
}] @step(1)
|
||||
|
||||
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
|
||||
policies: *[] | [...string]
|
||||
if parameter.topology != _|_ {
|
||||
policies: [parameter.topology]
|
||||
}
|
||||
} @step(2)
|
||||
|
||||
apply: op.#Steps & {
|
||||
for p in getPlacements.placements {
|
||||
for o in objects {
|
||||
"\(p.cluster)-\(o.kind)": op.#Apply & {
|
||||
value: o
|
||||
cluster: p.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(3)
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the export destination
|
||||
name?: string
|
||||
// +usage=Specify the namespace of the export destination
|
||||
namespace?: string
|
||||
// +usage=Specify the ip to be export
|
||||
ip: string
|
||||
// +usage=Specify the port to be used in service
|
||||
port: int
|
||||
// +usage=Specify the port to be export
|
||||
targetPort: int
|
||||
// +usage=Specify the topology to export
|
||||
topology?: string
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
|
||||
name: export2config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.configName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
data: parameter.data
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the config map
|
||||
configName: string
|
||||
// +usage=Specify the namespace of the config map
|
||||
namespace?: string
|
||||
// +usage=Specify the data of config map
|
||||
data: {}
|
||||
// +usage=Specify the cluster of the config map
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to Kubernetes Secret in your workflow.
|
||||
name: export2secret
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
secret: op.#Steps & {
|
||||
data: *parameter.data | {}
|
||||
if parameter.kind == "docker-registry" && parameter.dockerRegistry != _|_ {
|
||||
registryData: auths: "\(parameter.dockerRegistry.server)": {
|
||||
username: parameter.dockerRegistry.username
|
||||
password: parameter.dockerRegistry.password
|
||||
auth: base64.Encode(null, "\(parameter.dockerRegistry.username):\(parameter.dockerRegistry.password)")
|
||||
}
|
||||
data: ".dockerconfigjson": json.Marshal(registryData)
|
||||
}
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
if parameter.type == _|_ && parameter.kind == "docker-registry" {
|
||||
type: "kubernetes.io/dockerconfigjson"
|
||||
}
|
||||
if parameter.type != _|_ {
|
||||
type: parameter.type
|
||||
}
|
||||
metadata: {
|
||||
name: parameter.secretName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
stringData: data
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the secret
|
||||
secretName: string
|
||||
// +usage=Specify the namespace of the secret
|
||||
namespace?: string
|
||||
// +usage=Specify the type of the secret
|
||||
type?: string
|
||||
// +usage=Specify the data of secret
|
||||
data: {}
|
||||
// +usage=Specify the cluster of the secret
|
||||
cluster: *"" | string
|
||||
// +usage=Specify the kind of the secret
|
||||
kind: *"generic" | "docker-registry"
|
||||
// +usage=Specify the docker data
|
||||
dockerRegistry?: {
|
||||
// +usage=Specify the username of the docker registry
|
||||
username: string
|
||||
// +usage=Specify the password of the docker registry
|
||||
password: string
|
||||
// +usage=Specify the server of the docker registry
|
||||
server: *"https://index.docker.io/v1/" | string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/expose.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Expose port to enable web traffic for your component.
|
||||
name: expose
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
outputs: service: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
metadata: annotations: parameter.annotations
|
||||
spec: {
|
||||
if parameter["matchLabels"] == _|_ {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
}
|
||||
if parameter["matchLabels"] != _|_ {
|
||||
selector: parameter["matchLabels"]
|
||||
}
|
||||
|
||||
// compatible with the old way
|
||||
if parameter["port"] != _|_ if parameter["ports"] == _|_ {
|
||||
ports: [
|
||||
for p in parameter.port {
|
||||
name: "port-" + strconv.FormatInt(p, 10)
|
||||
port: p
|
||||
targetPort: p
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter["ports"] != _|_ {
|
||||
ports: [ for v in parameter.ports {
|
||||
port: v.port
|
||||
targetPort: v.port
|
||||
if v.name != _|_ {
|
||||
name: v.name
|
||||
}
|
||||
if v.name == _|_ {
|
||||
_name: "port-" + strconv.FormatInt(v.port, 10)
|
||||
name: *_name | string
|
||||
if v.protocol != "TCP" {
|
||||
name: _name + "-" + strings.ToLower(v.protocol)
|
||||
}
|
||||
}
|
||||
if v.nodePort != _|_ if parameter.type == "NodePort" {
|
||||
nodePort: v.nodePort
|
||||
}
|
||||
if v.protocol != _|_ {
|
||||
protocol: v.protocol
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
type: parameter.type
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Deprecated, the old way to specify the exposion ports
|
||||
port?: [...int]
|
||||
// +usage=Specify portsyou want customer traffic sent to
|
||||
ports?: [...{
|
||||
// +usage=Number of port to expose on the pod's IP address
|
||||
port: int
|
||||
// +usage=Name of the port
|
||||
name?: string
|
||||
// +usage=Protocol for port. Must be UDP, TCP, or SCTP
|
||||
protocol: *"TCP" | "UDP" | "SCTP"
|
||||
// +usage=exposed node port. Only Valid when exposeType is NodePort
|
||||
nodePort?: int
|
||||
}]
|
||||
// +usage=Specify the annotaions of the exposed service
|
||||
annotations: [string]: string
|
||||
matchLabels?: [string]: string
|
||||
// +usage=Specify what kind of Service you want. options: "ClusterIP","NodePort","LoadBalancer","ExternalName"
|
||||
type: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
|
||||
}
|
||||
stage: PostDispatch
|
||||
status:
|
||||
customStatus: |-
|
||||
message: *"" | string
|
||||
service: context.outputs.service
|
||||
if service.spec.type == "ClusterIP" {
|
||||
message: "ClusterIP: \(service.spec.clusterIP)"
|
||||
}
|
||||
if service.spec.type == "LoadBalancer" {
|
||||
status: service.status
|
||||
isHealth: *false | bool
|
||||
if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ {
|
||||
isHealth: true
|
||||
}
|
||||
if !isHealth {
|
||||
message: "ExternalIP: Pending"
|
||||
}
|
||||
if isHealth {
|
||||
message: "ExternalIP: \(status.loadBalancer.ingress[0].ip)"
|
||||
}
|
||||
}
|
||||
healthPolicy: |-
|
||||
service: context.outputs.service
|
||||
if service.spec.type == "LoadBalancer" {
|
||||
status: service.status
|
||||
isHealth: *false | bool
|
||||
if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ {
|
||||
isHealth: true
|
||||
}
|
||||
}
|
||||
if service.spec.type != "LoadBalancer" {
|
||||
isHealth: true
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/garbage-collect.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: PolicyDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Configure the garbage collect behaviour for the application.
|
||||
name: garbage-collect
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#GarbageCollectPolicyRule: {
|
||||
// +usage=Specify how to select the targets of the rule
|
||||
selector: [...#ResourcePolicyRuleSelector]
|
||||
// +usage=Specify the strategy for target resource to recycle
|
||||
strategy: *"onAppUpdate" | "onAppDelete" | "never"
|
||||
}
|
||||
|
||||
#ResourcePolicyRuleSelector: {
|
||||
// +usage=Select resources by component names
|
||||
componentNames?: [...string]
|
||||
// +usage=Select resources by component types
|
||||
componentTypes?: [...string]
|
||||
// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
|
||||
oamTypes?: [...string]
|
||||
// +usage=Select resources by trait types
|
||||
traitTypes?: [...string]
|
||||
// +usage=Select resources by resource types (like Deployment)
|
||||
resourceTypes?: [...string]
|
||||
// +usage=Select resources by their names
|
||||
resourceNames?: [...string]
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually
|
||||
keepLegacyResource: *false | bool
|
||||
// +usage=If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
|
||||
continueOnFailure: *false | bool
|
||||
// +usage=Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used
|
||||
rules?: [...#GarbageCollectPolicyRule]
|
||||
}
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/gateway.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Enable public web traffic for the component, the ingress API matches K8s v1.20+.
|
||||
name: gateway
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
// trait template can have multiple outputs in one trait
|
||||
outputs: service: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
ports: [
|
||||
for k, v in parameter.http {
|
||||
port: v
|
||||
targetPort: v
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
legacyAPI: context.clusterVersion.minor < 19
|
||||
outputs: ingress: {
|
||||
if legacyAPI {
|
||||
apiVersion: "networking.k8s.io/v1beta1"
|
||||
}
|
||||
if !legacyAPI {
|
||||
apiVersion: "networking.k8s.io/v1"
|
||||
}
|
||||
kind: "Ingress"
|
||||
metadata: {
|
||||
name: context.name
|
||||
annotations: {
|
||||
if !parameter.classInSpec {
|
||||
"kubernetes.io/ingress.class": parameter.class
|
||||
}
|
||||
if parameter.gatewayHost != _|_ {
|
||||
"ingress.controller/host": parameter.gatewayHost
|
||||
}
|
||||
}
|
||||
}
|
||||
spec: {
|
||||
if parameter.classInSpec {
|
||||
ingressClassName: parameter.class
|
||||
}
|
||||
if parameter.secretName != _|_ {
|
||||
tls: [{
|
||||
hosts: [
|
||||
parameter.domain,
|
||||
]
|
||||
secretName: parameter.secretName
|
||||
}]
|
||||
}
|
||||
rules: [{
|
||||
if parameter.domain != _|_ {
|
||||
host: parameter.domain
|
||||
}
|
||||
http: paths: [
|
||||
for k, v in parameter.http {
|
||||
path: k
|
||||
pathType: "ImplementationSpecific"
|
||||
backend: {
|
||||
if legacyAPI {
|
||||
serviceName: context.name
|
||||
servicePort: v
|
||||
}
|
||||
if !legacyAPI {
|
||||
service: {
|
||||
name: context.name
|
||||
port: number: v
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the domain you want to expose
|
||||
domain?: string
|
||||
|
||||
// +usage=Specify the mapping relationship between the http path and the workload port
|
||||
http: [string]: int
|
||||
|
||||
// +usage=Specify the class of ingress to use
|
||||
class: *"nginx" | string
|
||||
|
||||
// +usage=Set ingress class in '.spec.ingressClassName' instead of 'kubernetes.io/ingress.class' annotation.
|
||||
classInSpec: *false | bool
|
||||
|
||||
// +usage=Specify the secret name you want to quote to use tls.
|
||||
secretName?: string
|
||||
|
||||
// +usage=Specify the host of the ingress gateway, which is used to generate the endpoints when the host is empty.
|
||||
gatewayHost?: string
|
||||
}
|
||||
status:
|
||||
customStatus: |-
|
||||
if context.outputs.ingress.status.loadBalancer.ingress == _|_ {
|
||||
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n"
|
||||
}
|
||||
if context.outputs.ingress.status.loadBalancer.ingress != _|_ {
|
||||
let igs = context.outputs.ingress.status.loadBalancer.ingress
|
||||
let host = context.outputs.ingress.spec.rules[0].host
|
||||
if igs[0].ip != _|_ {
|
||||
if host != _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
|
||||
}
|
||||
if host == _|_ {
|
||||
message: "Host not specified, visit the cluster or load balancer in front of the cluster with IP: " + igs[0].ip
|
||||
}
|
||||
}
|
||||
if igs[0].ip == _|_ {
|
||||
if host != _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
|
||||
}
|
||||
if host == _|_ {
|
||||
message: "Host not specified, visit the cluster or load balancer in front of the cluster"
|
||||
}
|
||||
}
|
||||
}
|
||||
healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0'
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/generate-jdbc-connection.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/description: Generate a JDBC connection based on Component of alibaba-rds
|
||||
name: generate-jdbc-connection
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
output: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dbHost: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_HOST"])}
|
||||
dbPort: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PORT"])}
|
||||
dbName: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_NAME"])}
|
||||
username: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_USER"])}
|
||||
password: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PASSWORD"])}
|
||||
|
||||
env: [
|
||||
{name: "url", value: "jdbc://" + dbHost.str + ":" + dbPort.str + "/" + dbName.str + "?characterEncoding=utf8&useSSL=false"},
|
||||
{name: "username", value: username.str},
|
||||
{name: "password", value: password.str},
|
||||
]
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the secret generated by database component
|
||||
name: string
|
||||
// +usage=Specify the namespace of the secret generated by database component
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/health.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: PolicyDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply periodical health checking to the application.
|
||||
name: health
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
manageHealthCheck: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: {
|
||||
apiVersion: "core.oam.dev/v1alpha2"
|
||||
kind: "HealthScope"
|
||||
spec: {
|
||||
"probe-timeout": parameter.probeTimeout
|
||||
"probe-interval": parameter.probeInterval
|
||||
appReferences: [{
|
||||
appName: context.appName
|
||||
}]
|
||||
workloadRefs: []
|
||||
manageHealthCheck: true
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify health checking timeout(seconds), default 10s
|
||||
probeTimeout: *10 | int
|
||||
// +usage=Specify health checking interval(seconds), default 30s
|
||||
probeInterval: *30 | int
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/hostalias.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
name: hostalias
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: {
|
||||
// +patchKey=ip
|
||||
spec: template: spec: hostAliases: parameter.hostAliases
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the hostAliases to add
|
||||
hostAliases: [...{
|
||||
ip: string
|
||||
hostnames: [...string]
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/hpa.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Configure k8s HPA for Deployment or Statefulsets
|
||||
name: hpa
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
outputs: hpa: {
|
||||
if context.clusterVersion.minor < 23 {
|
||||
apiVersion: "autoscaling/v2beta2"
|
||||
}
|
||||
if context.clusterVersion.minor >= 23 {
|
||||
apiVersion: "autoscaling/v2"
|
||||
}
|
||||
kind: "HorizontalPodAutoscaler"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
scaleTargetRef: {
|
||||
apiVersion: parameter.targetAPIVersion
|
||||
kind: parameter.targetKind
|
||||
name: context.name
|
||||
}
|
||||
minReplicas: parameter.min
|
||||
maxReplicas: parameter.max
|
||||
metrics: [
|
||||
{
|
||||
type: "Resource"
|
||||
resource: {
|
||||
name: "cpu"
|
||||
target: {
|
||||
type: parameter.cpu.type
|
||||
if parameter.cpu.type == "Utilization" {
|
||||
averageUtilization: parameter.cpu.value
|
||||
}
|
||||
if parameter.cpu.type == "AverageValue" {
|
||||
averageValue: parameter.cpu.value
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
if parameter.mem != _|_ {
|
||||
{
|
||||
type: "Resource"
|
||||
resource: {
|
||||
name: "memory"
|
||||
target: {
|
||||
type: parameter.mem.type
|
||||
if parameter.cpu.type == "Utilization" {
|
||||
averageUtilization: parameter.cpu.value
|
||||
}
|
||||
if parameter.cpu.type == "AverageValue" {
|
||||
averageValue: parameter.cpu.value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
if parameter.podCustomMetrics != _|_ for m in parameter.podCustomMetrics {
|
||||
type: "Pods"
|
||||
pods: {
|
||||
metric: name: m.name
|
||||
target: {
|
||||
type: "AverageValue"
|
||||
averageValue: m.value
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the minimal number of replicas to which the autoscaler can scale down
|
||||
min: *1 | int
|
||||
// +usage=Specify the maximum number of of replicas to which the autoscaler can scale up
|
||||
max: *10 | int
|
||||
// +usage=Specify the apiVersion of scale target
|
||||
targetAPIVersion: *"apps/v1" | string
|
||||
// +usage=Specify the kind of scale target
|
||||
targetKind: *"Deployment" | string
|
||||
cpu: {
|
||||
// +usage=Specify resource metrics in terms of percentage("Utilization") or direct value("AverageValue")
|
||||
type: *"Utilization" | "AverageValue"
|
||||
// +usage=Specify the value of CPU utilization or averageValue
|
||||
value: *50 | int
|
||||
}
|
||||
mem?: {
|
||||
// +usage=Specify resource metrics in terms of percentage("Utilization") or direct value("AverageValue")
|
||||
type: *"Utilization" | "AverageValue"
|
||||
// +usage=Specify the value of MEM utilization or averageValue
|
||||
value: *50 | int
|
||||
}
|
||||
// +usage=Specify custom metrics of pod type
|
||||
podCustomMetrics?: [...{
|
||||
// +usage=Specify name of custom metrics
|
||||
name: string
|
||||
// +usage=Specify target value of custom metrics
|
||||
value: string
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/import-grafana-dashboard.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Import dashboards to Grafana
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: import-grafana-dashboard
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads: []
|
||||
conflictsWith: []
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
outputs: registerdatasource: {
|
||||
apiVersion: "grafana.extension.oam.dev/v1alpha1"
|
||||
kind: "ImportDashboard"
|
||||
spec: {
|
||||
grafana: {
|
||||
service: parameter.grafanaServiceName
|
||||
namespace: parameter.grafanaServiceNamespace
|
||||
credentialSecret: parameter.credentialSecret
|
||||
credentialSecretNamespace: parameter.credentialSecretNamespace
|
||||
}
|
||||
urls: parameter.urls
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
grafanaServiceName: string
|
||||
grafanaServiceNamespace: *"default" | string
|
||||
credentialSecret: string
|
||||
credentialSecretNamespace: *"default" | string
|
||||
urls: [...string]
|
||||
|
||||
}
|
||||
workloadRefPath: ""
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/ingress-1-20.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Enable public web traffic for the component, the ingress API matches K8s v1.20+.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
name: ingress-1-20
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
// trait template can have multiple outputs in one trait
|
||||
outputs: service: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
ports: [
|
||||
for k, v in parameter.http {
|
||||
port: v
|
||||
targetPort: v
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
outputs: ingress: {
|
||||
apiVersion: "networking.k8s.io/v1"
|
||||
kind: "Ingress"
|
||||
metadata: {
|
||||
name: context.name
|
||||
annotations: "kubernetes.io/ingress.class": parameter.class
|
||||
}
|
||||
spec: rules: [{
|
||||
host: parameter.domain
|
||||
http: paths: [
|
||||
for k, v in parameter.http {
|
||||
path: k
|
||||
pathType: "ImplementationSpecific"
|
||||
backend: service: {
|
||||
name: context.name
|
||||
port: number: v
|
||||
}
|
||||
},
|
||||
]
|
||||
}]
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the domain you want to expose
|
||||
domain: string
|
||||
|
||||
// +usage=Specify the mapping relationship between the http path and the workload port
|
||||
http: [string]: int
|
||||
|
||||
// +usage=Specify the class of ingress to use
|
||||
class: *"nginx" | string
|
||||
}
|
||||
status:
|
||||
customStatus: |-
|
||||
let igs = context.outputs.ingress.status.loadBalancer.ingress
|
||||
if igs == _|_ {
|
||||
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n"
|
||||
}
|
||||
if len(igs) > 0 {
|
||||
if igs[0].ip != _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
|
||||
}
|
||||
if igs[0].ip == _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
|
||||
}
|
||||
}
|
||||
healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0'
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/ingress.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Enable public web traffic for the component.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
name: ingress
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
// trait template can have multiple outputs in one trait
|
||||
outputs: service: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
ports: [
|
||||
for k, v in parameter.http {
|
||||
port: v
|
||||
targetPort: v
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
outputs: ingress: {
|
||||
apiVersion: "networking.k8s.io/v1beta1"
|
||||
kind: "Ingress"
|
||||
metadata: name: context.name
|
||||
spec: rules: [{
|
||||
host: parameter.domain
|
||||
http: paths: [
|
||||
for k, v in parameter.http {
|
||||
path: k
|
||||
backend: {
|
||||
serviceName: context.name
|
||||
servicePort: v
|
||||
}
|
||||
},
|
||||
]
|
||||
}]
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the domain you want to expose
|
||||
domain: string
|
||||
|
||||
// +usage=Specify the mapping relationship between the http path and the workload port
|
||||
http: [string]: int
|
||||
}
|
||||
status:
|
||||
customStatus: |-
|
||||
let igs = context.outputs.ingress.status.loadBalancer.ingress
|
||||
if igs == _|_ {
|
||||
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n"
|
||||
}
|
||||
if len(igs) > 0 {
|
||||
if igs[0].ip != _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
|
||||
}
|
||||
if igs[0].ip == _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
|
||||
}
|
||||
}
|
||||
healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0'
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/init-container.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: add an init container and use shared volume with pod
|
||||
name: init-container
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [{
|
||||
name: context.name
|
||||
// +patchKey=name
|
||||
volumeMounts: [{
|
||||
name: parameter.mountName
|
||||
mountPath: parameter.appMountPath
|
||||
}]
|
||||
}]
|
||||
// +patchKey=name
|
||||
initContainers: [{
|
||||
name: parameter.name
|
||||
image: parameter.image
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
if parameter.cmd != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
if parameter.args != _|_ {
|
||||
args: parameter.args
|
||||
}
|
||||
if parameter["env"] != _|_ {
|
||||
env: parameter.env
|
||||
}
|
||||
|
||||
// +patchKey=name
|
||||
volumeMounts: [{
|
||||
name: parameter.mountName
|
||||
mountPath: parameter.initMountPath
|
||||
}] + parameter.extraVolumeMounts
|
||||
}]
|
||||
// +patchKey=name
|
||||
volumes: [{
|
||||
name: parameter.mountName
|
||||
emptyDir: {}
|
||||
}]
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of init container
|
||||
name: string
|
||||
|
||||
// +usage=Specify the image of init container
|
||||
image: string
|
||||
|
||||
// +usage=Specify image pull policy for your service
|
||||
imagePullPolicy: *"IfNotPresent" | "Always" | "Never"
|
||||
|
||||
// +usage=Specify the commands run in the init container
|
||||
cmd?: [...string]
|
||||
|
||||
// +usage=Specify the args run in the init container
|
||||
args?: [...string]
|
||||
|
||||
// +usage=Specify the env run in the init container
|
||||
env?: [...{
|
||||
// +usage=Environment variable name
|
||||
name: string
|
||||
// +usage=The value of the environment variable
|
||||
value?: string
|
||||
// +usage=Specifies a source the value of this var should come from
|
||||
valueFrom?: {
|
||||
// +usage=Selects a key of a secret in the pod's namespace
|
||||
secretKeyRef?: {
|
||||
// +usage=The name of the secret in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the secret to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
// +usage=Selects a key of a config map in the pod's namespace
|
||||
configMapKeyRef?: {
|
||||
// +usage=The name of the config map in the pod's namespace to select from
|
||||
name: string
|
||||
// +usage=The key of the config map to select from. Must be a valid secret key
|
||||
key: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// +usage=Specify the mount name of shared volume
|
||||
mountName: *"workdir" | string
|
||||
|
||||
// +usage=Specify the mount path of app container
|
||||
appMountPath: string
|
||||
|
||||
// +usage=Specify the mount path of init container
|
||||
initMountPath: string
|
||||
|
||||
// +usage=Specify the extra volume mounts for the init container
|
||||
extraVolumeMounts: [...{
|
||||
// +usage=The name of the volume to be mounted
|
||||
name: string
|
||||
// +usage=The mountPath for mount in the init container
|
||||
mountPath: string
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/json-merge-patch.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Patch the output following Json Merge Patch strategy, following RFC 7396.
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: json-merge-patch
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
parameter: {...}
|
||||
// +patchStrategy=jsonMergePatch
|
||||
patch: parameter
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/json-patch.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Patch the output following Json Patch strategy, following RFC 6902.
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: json-patch
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
parameter: operations: [...{...}]
|
||||
// +patchStrategy=jsonPatch
|
||||
patch: parameter
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/k8s-objects.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: K8s-objects allow users to specify raw K8s objects in properties
|
||||
name: k8s-objects
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: parameter.objects[0]
|
||||
|
||||
outputs: {
|
||||
for i, v in parameter.objects {
|
||||
if i > 0 {
|
||||
"objects-\(i)": v
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: objects: [...{}]
|
||||
workload:
|
||||
type: autodetects.core.oam.dev
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/k8s-update-strategy.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Set k8s update strategy for Deployment/DaemonSet/StatefulSet
|
||||
name: k8s-update-strategy
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
conflictsWith: []
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: {
|
||||
if parameter.targetKind == "Deployment" && parameter.strategy.type != "OnDelete" {
|
||||
// +patchStrategy=retainKeys
|
||||
strategy: {
|
||||
type: parameter.strategy.type
|
||||
if parameter.strategy.type == "RollingUpdate" {
|
||||
rollingUpdate: {
|
||||
maxSurge: parameter.strategy.rollingStrategy.maxSurge
|
||||
maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.targetKind == "StatefulSet" && parameter.strategy.type != "Recreate" {
|
||||
// +patchStrategy=retainKeys
|
||||
updateStrategy: {
|
||||
type: parameter.strategy.type
|
||||
if parameter.strategy.type == "RollingUpdate" {
|
||||
rollingUpdate: partition: parameter.strategy.rollingStrategy.partition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.targetKind == "DaemonSet" && parameter.strategy.type != "Recreate" {
|
||||
// +patchStrategy=retainKeys
|
||||
updateStrategy: {
|
||||
type: parameter.strategy.type
|
||||
if parameter.strategy.type == "RollingUpdate" {
|
||||
rollingUpdate: {
|
||||
maxSurge: parameter.strategy.rollingStrategy.maxSurge
|
||||
maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the apiVersion of target
|
||||
targetAPIVersion: *"apps/v1" | string
|
||||
// +usage=Specify the kind of target
|
||||
targetKind: *"Deployment" | "StatefulSet" | "DaemonSet"
|
||||
// +usage=Specify the strategy of update
|
||||
strategy: {
|
||||
// +usage=Specify the strategy type
|
||||
type: *"RollingUpdate" | "Recreate" | "OnDelete"
|
||||
// +usage=Specify the parameters of rollong update strategy
|
||||
rollingStrategy?: {
|
||||
maxSurge: *"25%" | string
|
||||
maxUnavailable: *"25%" | string
|
||||
partition: *0 | int
|
||||
}
|
||||
}
|
||||
}
|
||||
workloadRefPath: ""
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/labels.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add labels on your workload. if it generates pod, add same label for generated pods.
|
||||
name: labels
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
// +patchStrategy=jsonMergePatch
|
||||
patch: {
|
||||
metadata: labels: {
|
||||
for k, v in parameter {
|
||||
(k): v
|
||||
}
|
||||
}
|
||||
if context.output.spec != _|_ && context.output.spec.template != _|_ {
|
||||
spec: template: metadata: labels: {
|
||||
for k, v in parameter {
|
||||
(k): v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: [string]: string | null
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/lifecycle.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add lifecycle hooks for every container of K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
name: lifecycle
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: containers: [...{
|
||||
lifecycle: {
|
||||
if parameter.postStart != _|_ {
|
||||
postStart: parameter.postStart
|
||||
}
|
||||
if parameter.preStop != _|_ {
|
||||
preStop: parameter.preStop
|
||||
}
|
||||
}
|
||||
}]
|
||||
parameter: {
|
||||
postStart?: #LifeCycleHandler
|
||||
preStop?: #LifeCycleHandler
|
||||
}
|
||||
#Port: int & >=1 & <=65535
|
||||
#LifeCycleHandler: {
|
||||
exec?: command: [...string]
|
||||
httpGet?: {
|
||||
path?: string
|
||||
port: #Port
|
||||
host?: string
|
||||
scheme: *"HTTP" | "HTTPS"
|
||||
httpHeaders?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
}
|
||||
tcpSocket?: {
|
||||
port: #Port
|
||||
host?: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/list-config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: List the configs
|
||||
name: list-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: op.#ListConfig & {
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
template: parameter.template
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the template of the config.
|
||||
template: string
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: nocalhost develop configuration.
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: nocalhost
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- statefulsets.apps
|
||||
- daemonsets.apps
|
||||
- jobs.batch
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
outputs: nocalhostService: {
|
||||
apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata: name: context.name
|
||||
spec: {
|
||||
selector: "app.oam.dev/component": context.name
|
||||
ports: [
|
||||
{
|
||||
port: parameter.port
|
||||
targetPort: parameter.port
|
||||
},
|
||||
]
|
||||
type: "ClusterIP"
|
||||
}
|
||||
}
|
||||
|
||||
patch: metadata: annotations: {
|
||||
"dev.nocalhost/application-name": context.appName
|
||||
"dev.nocalhost/application-namespace": context.namespace
|
||||
"dev.nocalhost": json.Marshal({
|
||||
name: context.name
|
||||
serviceType: parameter.serviceType
|
||||
containers: [
|
||||
{
|
||||
name: context.name
|
||||
dev: {
|
||||
if parameter.gitUrl != _|_ {
|
||||
gitUrl: parameter.gitUrl
|
||||
}
|
||||
if parameter.image == "go" {
|
||||
image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest"
|
||||
}
|
||||
if parameter.image == "java" {
|
||||
image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest"
|
||||
}
|
||||
if parameter.image == "python" {
|
||||
image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:latest"
|
||||
}
|
||||
if parameter.image == "node" {
|
||||
image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:latest"
|
||||
}
|
||||
if parameter.image == "ruby" {
|
||||
image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:latest"
|
||||
}
|
||||
if parameter.image != "go" && parameter.image != "java" && parameter.image != "python" && parameter.image != "node" && parameter.image != "ruby" {
|
||||
image: parameter.image
|
||||
}
|
||||
shell: parameter.shell
|
||||
workDir: parameter.workDir
|
||||
if parameter.storageClass != _|_ {
|
||||
storageClass: parameter.storageClass
|
||||
}
|
||||
resources: {
|
||||
limits: parameter.resources.limits
|
||||
requests: parameter.resources.requests
|
||||
}
|
||||
if parameter.persistentVolumeDirs != _|_ {
|
||||
persistentVolumeDirs: [
|
||||
for v in parameter.persistentVolumeDirs {
|
||||
path: v.path
|
||||
capacity: v.capacity
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.command != _|_ {
|
||||
command: parameter.command
|
||||
}
|
||||
if parameter.debug != _|_ {
|
||||
debug: parameter.debug
|
||||
}
|
||||
hotReload: parameter.hotReload
|
||||
if parameter.sync != _|_ {
|
||||
sync: parameter.sync
|
||||
}
|
||||
if parameter.env != _|_ {
|
||||
env: [
|
||||
for v in parameter.env {
|
||||
name: v.name
|
||||
value: v.value
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.portForward != _|_ {
|
||||
portForward: parameter.portForward
|
||||
}
|
||||
if parameter.portForward == _|_ {
|
||||
portForward: ["\(parameter.port):\(parameter.port)"]
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
language: "go" | "java" | "python" | "node" | "ruby"
|
||||
parameter: {
|
||||
port: int
|
||||
serviceType: *"deployment" | string
|
||||
gitUrl?: string
|
||||
image: language | string
|
||||
shell: *"bash" | string
|
||||
workDir: *"/home/nocalhost-dev" | string
|
||||
storageClass?: string
|
||||
command: {
|
||||
run: *["sh", "run.sh"] | [...string]
|
||||
debug: *["sh", "debug.sh"] | [...string]
|
||||
}
|
||||
debug?: remoteDebugPort?: int
|
||||
hotReload: *true | bool
|
||||
sync: {
|
||||
type: *"send" | string
|
||||
filePattern: *["./"] | [...string]
|
||||
ignoreFilePattern: *[".git", ".vscode", ".idea", ".gradle", "build"] | [...string]
|
||||
}
|
||||
env?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
portForward?: [...string]
|
||||
persistentVolumeDirs?: [...{
|
||||
path: string
|
||||
capacity: string
|
||||
}]
|
||||
resources: {
|
||||
limits: {
|
||||
memory: *"2Gi" | string
|
||||
cpu: *"2" | string
|
||||
}
|
||||
requests: {
|
||||
memory: *"512Mi" | string
|
||||
cpu: *"0.5" | string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/node-affinity.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: affinity specify node affinity and toleration on K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: node-affinity
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: {
|
||||
if parameter.affinity != _|_ {
|
||||
affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{
|
||||
matchExpressions: [
|
||||
for k, v in parameter.affinity {
|
||||
key: k
|
||||
operator: "In"
|
||||
values: v
|
||||
},
|
||||
]}]
|
||||
}
|
||||
if parameter.tolerations != _|_ {
|
||||
tolerations: [
|
||||
for k, v in parameter.tolerations {
|
||||
effect: "NoSchedule"
|
||||
key: k
|
||||
operator: "Equal"
|
||||
value: v
|
||||
}]
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
affinity?: [string]: [...string]
|
||||
tolerations?: [string]: string
|
||||
}
|
||||
|
||||
@@ -1,346 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/notification.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: External Integration
|
||||
definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
|
||||
name: notification
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
// +usage=Please fulfill its url and message if you want to send Lark messages
|
||||
lark?: {
|
||||
// +usage=Specify the the lark url, you can either sepcify it in value or use secretRef
|
||||
url: close({
|
||||
// +usage=the url address content in string
|
||||
value: string
|
||||
}) | close({
|
||||
secretRef: {
|
||||
// +usage=name is the name of the secret
|
||||
name: string
|
||||
// +usage=key is the key in the secret
|
||||
key: string
|
||||
}
|
||||
})
|
||||
// +usage=Specify the message that you want to sent, refer to [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b).
|
||||
message: {
|
||||
// +usage=msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker
|
||||
msg_type: string
|
||||
// +usage=content should be json encode string
|
||||
content: string
|
||||
}
|
||||
}
|
||||
// +usage=Please fulfill its url and message if you want to send DingTalk messages
|
||||
dingding?: {
|
||||
// +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef
|
||||
url: close({
|
||||
// +usage=the url address content in string
|
||||
value: string
|
||||
}) | close({
|
||||
secretRef: {
|
||||
// +usage=name is the name of the secret
|
||||
name: string
|
||||
// +usage=key is the key in the secret
|
||||
key: string
|
||||
}
|
||||
})
|
||||
// +usage=Specify the message that you want to sent, refer to [dingtalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw)
|
||||
message: {
|
||||
// +usage=Specify the message content of dingtalk notification
|
||||
text?: close({
|
||||
content: string
|
||||
})
|
||||
// +usage=msgType can be text, link, mardown, actionCard, feedCard
|
||||
msgtype: *"text" | "link" | "markdown" | "actionCard" | "feedCard"
|
||||
#link: {
|
||||
text?: string
|
||||
title?: string
|
||||
messageUrl?: string
|
||||
picUrl?: string
|
||||
}
|
||||
|
||||
link?: #link
|
||||
markdown?: close({
|
||||
text: string
|
||||
title: string
|
||||
})
|
||||
at?: close({
|
||||
atMobiles?: [...string]
|
||||
isAtAll?: bool
|
||||
})
|
||||
actionCard?: close({
|
||||
text: string
|
||||
title: string
|
||||
hideAvatar: string
|
||||
btnOrientation: string
|
||||
singleTitle: string
|
||||
singleURL: string
|
||||
btns?: [...close({
|
||||
title: string
|
||||
actionURL: string
|
||||
})]
|
||||
})
|
||||
feedCard?: close({
|
||||
links: [...#link]
|
||||
})
|
||||
}
|
||||
}
|
||||
// +usage=Please fulfill its url and message if you want to send Slack messages
|
||||
slack?: {
|
||||
// +usage=Specify the the slack url, you can either sepcify it in value or use secretRef
|
||||
url: close({
|
||||
// +usage=the url address content in string
|
||||
value: string
|
||||
}) | close({
|
||||
secretRef: {
|
||||
// +usage=name is the name of the secret
|
||||
name: string
|
||||
// +usage=key is the key in the secret
|
||||
key: string
|
||||
}
|
||||
})
|
||||
// +usage=Specify the message that you want to sent, refer to [slack messaging](https://api.slack.com/reference/messaging/payload)
|
||||
message: {
|
||||
// +usage=Specify the message text for slack notification
|
||||
text: string
|
||||
blocks?: [...block]
|
||||
attachments?: close({
|
||||
blocks?: [...block]
|
||||
color?: string
|
||||
})
|
||||
thread_ts?: string
|
||||
// +usage=Specify the message text format in markdown for slack notification
|
||||
mrkdwn?: *true | bool
|
||||
}
|
||||
}
|
||||
// +usage=Please fulfill its from, to and content if you want to send email
|
||||
email?: {
|
||||
// +usage=Specify the email info that you want to send from
|
||||
from: {
|
||||
// +usage=Specify the email address that you want to send from
|
||||
address: string
|
||||
// +usage=The alias is the email alias to show after sending the email
|
||||
alias?: string
|
||||
// +usage=Specify the password of the email, you can either sepcify it in value or use secretRef
|
||||
password: close({
|
||||
// +usage=the password content in string
|
||||
value: string
|
||||
}) | close({
|
||||
secretRef: {
|
||||
// +usage=name is the name of the secret
|
||||
name: string
|
||||
// +usage=key is the key in the secret
|
||||
key: string
|
||||
}
|
||||
})
|
||||
// +usage=Specify the host of your email
|
||||
host: string
|
||||
// +usage=Specify the port of the email host, default to 587
|
||||
port: *587 | int
|
||||
}
|
||||
// +usage=Specify the email address that you want to send to
|
||||
to: [...string]
|
||||
// +usage=Specify the content of the email
|
||||
content: {
|
||||
// +usage=Specify the subject of the email
|
||||
subject: string
|
||||
// +usage=Specify the context body of the email
|
||||
body: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
block: {
|
||||
type: string
|
||||
block_id?: string
|
||||
elements?: [...{
|
||||
type: string
|
||||
action_id?: string
|
||||
url?: string
|
||||
value?: string
|
||||
style?: string
|
||||
text?: textType
|
||||
confirm?: {
|
||||
title: textType
|
||||
text: textType
|
||||
confirm: textType
|
||||
deny: textType
|
||||
style?: string
|
||||
}
|
||||
options?: [...option]
|
||||
initial_options?: [...option]
|
||||
placeholder?: textType
|
||||
initial_date?: string
|
||||
image_url?: string
|
||||
alt_text?: string
|
||||
option_groups?: [...option]
|
||||
max_selected_items?: int
|
||||
initial_value?: string
|
||||
multiline?: bool
|
||||
min_length?: int
|
||||
max_length?: int
|
||||
dispatch_action_config?: trigger_actions_on?: [...string]
|
||||
initial_time?: string
|
||||
}]
|
||||
}
|
||||
|
||||
textType: {
|
||||
type: string
|
||||
text: string
|
||||
emoji?: bool
|
||||
verbatim?: bool
|
||||
}
|
||||
|
||||
option: {
|
||||
text: textType
|
||||
value: string
|
||||
description?: textType
|
||||
url?: string
|
||||
}
|
||||
|
||||
// send webhook notification
|
||||
ding: op.#Steps & {
|
||||
if parameter.dingding != _|_ {
|
||||
if parameter.dingding.url.value != _|_ {
|
||||
ding1: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url.value
|
||||
}
|
||||
}
|
||||
if parameter.dingding.url.secretRef != _|_ && parameter.dingding.url.value == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: parameter.dingding.url.secretRef.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.dingding.url.secretRef.key])}
|
||||
ding2: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lark: op.#Steps & {
|
||||
if parameter.lark != _|_ {
|
||||
if parameter.lark.url.value != _|_ {
|
||||
lark1: op.#Lark & {
|
||||
message: parameter.lark.message
|
||||
larkUrl: parameter.lark.url.value
|
||||
}
|
||||
}
|
||||
if parameter.lark.url.secretRef != _|_ && parameter.lark.url.value == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: parameter.lark.url.secretRef.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.lark.url.secretRef.key])}
|
||||
lark2: op.#Lark & {
|
||||
message: parameter.lark.message
|
||||
larkUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
slack: op.#Steps & {
|
||||
if parameter.slack != _|_ {
|
||||
if parameter.slack.url.value != _|_ {
|
||||
slack1: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url.value
|
||||
}
|
||||
}
|
||||
if parameter.slack.url.secretRef != _|_ && parameter.slack.url.value == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
name: parameter.slack.url.secretRef.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.slack.url.secretRef.key])}
|
||||
slack2: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
email: op.#Steps & {
|
||||
if parameter.email != _|_ {
|
||||
if parameter.email.from.password.value != _|_ {
|
||||
email1: op.#SendEmail & {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
password: parameter.email.from.password.value
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.email.from.password.secretRef != _|_ && parameter.email.from.password.value == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
name: parameter.email.from.password.secretRef.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.email.from.password.secretRef.key])}
|
||||
email2: op.#SendEmail & {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
password: stringValue.str
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/override.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: PolicyDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Describe the configuration to override when deploying resources, it only works with specified `deploy` step in workflow.
|
||||
name: override
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
#PatchParams: {
|
||||
// +usage=Specify the name of the patch component, if empty, all components will be merged
|
||||
name?: string
|
||||
// +usage=Specify the type of the patch component.
|
||||
type?: string
|
||||
// +usage=Specify the properties to override.
|
||||
properties?: {...}
|
||||
// +usage=Specify the traits to override.
|
||||
traits?: [...{
|
||||
// +usage=Specify the type of the trait to be patched.
|
||||
type: string
|
||||
// +usage=Specify the properties to override.
|
||||
properties?: {...}
|
||||
// +usage=Specify if the trait should be remove, default false
|
||||
disable: *false | bool
|
||||
}]
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the overridden component configuration.
|
||||
components: [...#PatchParams]
|
||||
// +usage=Specify a list of component names to use, if empty, all components will be selected.
|
||||
selector?: [...string]
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/patch.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Patch the output directly.
|
||||
name: patch
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
parameter: {...}
|
||||
// +patchStrategy=open
|
||||
patch: parameter
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/print-message-in-status.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: print message in workflow step status
|
||||
name: print-message-in-status
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
parameter: message: string
|
||||
|
||||
msg: op.#Message & {
|
||||
message: parameter.message
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/pure-ingress.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Enable public web traffic for the component without creating a Service.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: pure-ingress
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
conflictsWith: []
|
||||
podDisruptive: false
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
outputs: ingress: {
|
||||
apiVersion: "networking.k8s.io/v1beta1"
|
||||
kind: "Ingress"
|
||||
metadata: name: context.name
|
||||
spec: rules: [{
|
||||
host: parameter.domain
|
||||
http: paths: [
|
||||
for k, v in parameter.http {
|
||||
path: k
|
||||
backend: {
|
||||
serviceName: context.name
|
||||
servicePort: v
|
||||
}
|
||||
},
|
||||
]
|
||||
}]
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the domain you want to expose
|
||||
domain: string
|
||||
|
||||
// +usage=Specify the mapping relationship between the http path and the workload port
|
||||
http: [string]: int
|
||||
}
|
||||
status:
|
||||
customStatus: |-
|
||||
let igs = context.outputs.ingress.status.loadBalancer.ingress
|
||||
if igs == _|_ {
|
||||
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + " --route'\n"
|
||||
}
|
||||
if len(igs) > 0 {
|
||||
if igs[0].ip != _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
|
||||
}
|
||||
if igs[0].ip == _|_ {
|
||||
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
|
||||
}
|
||||
}
|
||||
workloadRefPath: ""
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/pvc.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Create a Persistent Volume Claim and mount the PVC as volume to the first container in the pod. This definition is DEPRECATED, please specify pvc in 'storage' instead.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
name: pvc
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: spec: {
|
||||
containers: [{
|
||||
if parameter.volumeMode == "Block" {
|
||||
// +patchKey=name
|
||||
volumeDevices: [
|
||||
for v in parameter.volumesToMount {
|
||||
{
|
||||
name: v.name
|
||||
devicePath: v.devicePath
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.volumeMode == "Filesystem" {
|
||||
// +patchKey=name
|
||||
volumeMounts: [
|
||||
for v in parameter.volumesToMount {
|
||||
{
|
||||
name: v.name
|
||||
mountPath: v.mountPath
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}]
|
||||
|
||||
// +patchKey=name
|
||||
volumes: [
|
||||
for v in parameter.volumesToMount {
|
||||
{
|
||||
name: v.name
|
||||
persistentVolumeClaim: claimName: parameter.claimName
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
outputs: "\(parameter.claimName)": {
|
||||
apiVersion: "v1"
|
||||
kind: "PersistentVolumeClaim"
|
||||
metadata: name: parameter.claimName
|
||||
spec: {
|
||||
accessModes: parameter.accessModes
|
||||
volumeMode: parameter.volumeMode
|
||||
if parameter.volumeName != _|_ {
|
||||
volumeName: parameter.volumeName
|
||||
}
|
||||
|
||||
if parameter.storageClassName != _|_ {
|
||||
storageClassName: parameter.storageClassName
|
||||
}
|
||||
resources: requests: storage: parameter.resources.requests.storage
|
||||
if parameter.resources.limits.storage != _|_ {
|
||||
resources: limits: storage: parameter.resources.limits.storage
|
||||
}
|
||||
if parameter.dataSourceRef != _|_ {
|
||||
dataSourceRef: parameter.dataSourceRef
|
||||
}
|
||||
if parameter.dataSource != _|_ {
|
||||
dataSource: parameter.dataSource
|
||||
}
|
||||
if parameter.selector != _|_ {
|
||||
dataSource: parameter.selector
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
claimName: string
|
||||
volumeMode: *"Filesystem" | string
|
||||
volumeName?: string
|
||||
accessModes: [...string]
|
||||
storageClassName?: string
|
||||
resources: {
|
||||
requests: storage: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
|
||||
limits?: storage: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
|
||||
}
|
||||
dataSourceRef?: {
|
||||
name: string
|
||||
kind: string
|
||||
apiGroup: string
|
||||
}
|
||||
dataSource?: {
|
||||
name: string
|
||||
kind: string
|
||||
apiGroup: string
|
||||
}
|
||||
selector?: {
|
||||
matchLabels?: [string]: string
|
||||
matchExpressions?: {
|
||||
key: string
|
||||
values: [...string]
|
||||
operator: string
|
||||
}
|
||||
}
|
||||
volumesToMount: [...{
|
||||
name: string
|
||||
if volumeMode == "Block" {
|
||||
devicePath: string
|
||||
}
|
||||
if volumeMode == "Filesystem" {
|
||||
mountPath: string
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/raw.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Raw allow users to specify raw K8s object in properties. This definition is DEPRECATED, please use 'k8s-objects' instead.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
name: raw
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: parameter
|
||||
parameter: {}
|
||||
workload:
|
||||
type: autodetects.core.oam.dev
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user