mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 24s
* chore: updates culenag version and syntax across all files Signed-off-by: Amit Singh <singhamitch@outlook.com> Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * debuggin: reverts tf provider changes Signed-off-by: Amit Singh <singhamitch@outlook.com> Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: Simplify provider configuration by removing 'providerBasic' and directly defining access keys and region for providers Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: Consolidate provider configuration by introducing 'providerBasic' for access keys and region Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: reorganize import statements in deepcopy files for consistency Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: reorder import statements for consistency across deepcopy files Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: Safely handle pattern parameter selectors to avoid panics in GetParameters and getStatusMap Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: add comment to clarify test context in definition_revision_test.go Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: remove redundant comment from test context initialization in definition_revision_test.go Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: Introduce GetSelectorLabel function to safely extract labels from CUE selectors Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: add newline at end of file in utils.go Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * chore: increase timeout for multi-cluster e2e Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> --------- Signed-off-by: Amit Singh <singhamitch@outlook.com> Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> Co-authored-by: Amit Singh <singhamitch@outlook.com> Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
118 lines
3.7 KiB
YAML
118 lines
3.7 KiB
YAML
# 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: |
|
|
import "list"
|
|
|
|
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: list.Concat([[{
|
|
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
|
|
}]
|
|
}
|
|
|