Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/kclrun/v1alpha1/kclrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type KCLRunSpec struct {
// Source is a required field for providing a KCL script inline.
Source string `json:"source" yaml:"source"`
// Params are the parameters in key-value pairs format.
Params map[string]runtime.RawExtension `json:"params,omitempty" yaml:"params,omitempty"`
Params runtime.RawExtension `json:"params,omitempty" yaml:"params,omitempty"`
}

// KCLRunStatus defines the observed state of KCLRun
Expand Down
7 changes: 0 additions & 7 deletions api/kclrun/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions config/crd/bases/krm.kcl.dev_kclruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ spec:
description: KCLRunSpec defines the desired state of KCLRun
properties:
params:
additionalProperties:
type: object
x-kubernetes-preserve-unknown-fields: true
description: Params are the parameters in key-value pairs format.
type: object
x-kubernetes-preserve-unknown-fields: true
source:
description: Source is a required field for providing a KCL script
inline.
Expand Down
25 changes: 25 additions & 0 deletions scripts/deploy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,29 @@ EOF
else
echo -e "${RED}The annotation 'managed-by: kcl-operator' is not added to the pod.${NC}"
fi
kubectl apply -f- << EOF
apiVersion: krm.kcl.dev/v1alpha1
kind: KCLRun
metadata:
name: web-service
annotations:
krm.kcl.dev/version: 0.0.1
krm.kcl.dev/type: abstraction
documentation: >-
Web service application abstraction
spec:
params:
name: app
containers:
nginx:
image: nginx
ports:
- containerPort: 80
service:
ports:
- port: 80
labels:
name: app
source: ./examples/abstraction/web-service/main.k
EOF
fi
Loading