File tree Expand file tree Collapse file tree 5 files changed +46
-2
lines changed
cue.mod/pkg/timoni.sh/core/v1alpha1 Expand file tree Collapse file tree 5 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ timoni -n default delete minimal
5252| ` metadata: labels: ` | ` {[ string]: string} ` | ` {} ` | Common labels for all resources |
5353| ` metadata: annotations: ` | ` {[ string]: string} ` | ` {} ` | Common annotations for all resources |
5454| ` podAnnotations: ` | ` {[ string]: string} ` | ` {} ` | Annotations applied to pods |
55- | ` imagePullSecrets: ` | ` [...corev1.LocalObjectReference] ` | ` [] ` | [ Kubernetes image pull secrets] ( https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod ) |
55+ | ` imagePullSecrets: ` | ` [...timoniv1.ObjectReference] ` | ` [] ` | [ Kubernetes image pull secrets] ( https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod ) |
5656| ` tolerations: ` | ` [ ...corev1.#Toleration] ` | ` [] ` | [ Kubernetes toleration] ( https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration ) |
5757| ` affinity: ` | ` corev1.#Affinity ` | ` {} ` | [ Kubernetes affinity and anti-affinity] ( https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity ) |
5858| ` resources: ` | ` timoniv1.#ResourceRequirements ` | ` {} ` | [ Kubernetes resource requests and limits] ( https://kubernetes.io/docs/concepts/configuration/manage-resources-containers ) |
Original file line number Diff line number Diff line change 1+ // Copyright 2023 Stefan Prodan
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ package v1alpha1
5+
6+ import " strings "
7+
8+ // ObjectReference is a reference to a Kubernetes object.
9+ #ObjectReference : {
10+ // Name of the referent.
11+ name ! : string & strings .MaxRunes (256 )
12+
13+ // Namespace of the referent.
14+ namespace ?: string & strings .MaxRunes (256 )
15+
16+ // API version of the referent.
17+ apiVersion ?: string & strings .MaxRunes (256 )
18+
19+ // Kind of the referent.
20+ kind ?: string & strings .MaxRunes (256 )
21+ }
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ import (
7777 // Pod optional settings.
7878 podAnnotations ?: {[string ]: string }
7979 podSecurityContext ?: corev1 .#PodSecurityContext
80- imagePullSecrets ?: [...corev1 . LocalObjectReference ]
80+ imagePullSecrets ?: [...timoniv1 . ObjectReference ]
8181 tolerations ?: [...corev1 .#Toleration ]
8282 affinity ?: corev1 .#Affinity
8383 topologySpreadConstraints ?: [...corev1 .#TopologySpreadConstraint ]
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ The Timoni's CUE schemas are included in the modules generated with `timoni mod
2121 with automatic generation of ` app.kubernetes.io/component ` label.
2222- ` #Selector ` - Schema for generating Kubernetes label selectors
2323 with automatic generation of ` app.kubernetes.io/name ` label.
24+ - ` #ObjectReference ` - Schema for generating Kubernetes object references
25+ based on ` apiVersion ` , ` kind ` , ` name ` and ` namespace ` .
2426
2527### Container Image
2628
Original file line number Diff line number Diff line change 1+ // Copyright 2023 Stefan Prodan
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ package v1alpha1
5+
6+ import " strings "
7+
8+ // ObjectReference is a reference to a Kubernetes object.
9+ #ObjectReference : {
10+ // Name of the referent.
11+ name ! : string & strings .MaxRunes (256 )
12+
13+ // Namespace of the referent.
14+ namespace ?: string & strings .MaxRunes (256 )
15+
16+ // API version of the referent.
17+ apiVersion ?: string & strings .MaxRunes (256 )
18+
19+ // Kind of the referent.
20+ kind ?: string & strings .MaxRunes (256 )
21+ }
You can’t perform that action at this time.
0 commit comments