@@ -59,71 +59,71 @@ spec:
5959
6060` ` ` go
6161type CodeServerSpec struct {
62- // Specifies the storage size that will be used for code server
63- // +kubebuilder:validation:Pattern="^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
64- // +kubebuilder:default="1Gi"
65- StorageSize string `json:"storageSize,omitempty"`
62+ // Specifies the storage size that will be used for code server
63+ // +kubebuilder:validation:Pattern="^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
64+ // +kubebuilder:default="1Gi"
65+ StorageSize string `json:"storageSize,omitempty"`
6666
67- // Specifies the storage class name for persistent volume claim
68- StorageClassName string `json:"storageClassName,omitempty"`
67+ // Specifies the storage class name for persistent volume claim
68+ StorageClassName string `json:"storageClassName,omitempty"`
6969
70- // Specifies the additional annotations for persistent volume claim
71- StorageAnnotations map[string]string `json:"storageAnnotations,omitempty"`
70+ // Specifies the additional annotations for persistent volume claim
71+ StorageAnnotations map[string]string `json:"storageAnnotations,omitempty"`
7272
73- // VolumeName specifies the volume name for persistent volume claim
74- VolumeName string `json:"volumeName,omitempty"`
73+ // VolumeName specifies the volume name for persistent volume claim
74+ VolumeName string `json:"volumeName,omitempty"`
7575
76- // Specifies the resource requirements for code server pod.
77- Resources corev1.ResourceRequirements `json:"resources,omitempty"`
76+ // Specifies the resource requirements for code server pod.
77+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
7878
79- // Specifies the period before controller suspend the resources (delete all resources except data).
80- SuspendAfterSeconds *int64 `json:"suspendAfterSeconds,omitempty"`
79+ // Specifies the period before controller suspend the resources (delete all resources except data).
80+ SuspendAfterSeconds *int64 `json:"suspendAfterSeconds,omitempty"`
8181
82- // Specifies the domain for code server
83- Domain string `json:"domain,omitempty"`
82+ // Specifies the domain for code server
83+ Domain string `json:"domain,omitempty"`
8484
85- // Specifies the envs
86- Envs []corev1.EnvVar `json:"envs,omitempty"`
85+ // Specifies the envs
86+ Envs []corev1.EnvVar `json:"envs,omitempty"`
8787
88- // Specifies the image used to running code server
89- // +kubebuilder:default="ghcr.io/coder/code-server:latest"
90- Image string `json:"image,omitempty"`
88+ // Specifies the image used to running code server
89+ // +kubebuilder:default="ghcr.io/coder/code-server:latest"
90+ Image string `json:"image,omitempty"`
9191
92- // Specifies the init plugins that will be running to finish before code server running.
93- InitPlugins map[string]map[string]string `json:"initPlugins,omitempty"`
92+ // Specifies the init plugins that will be running to finish before code server running.
93+ InitPlugins map[string]map[string]string `json:"initPlugins,omitempty"`
9494
95- // Specifies the node selector for scheduling.
96- NodeSelector map[string]string `json:"nodeSelector,omitempty"`
95+ // Specifies the node selector for scheduling.
96+ NodeSelector map[string]string `json:"nodeSelector,omitempty"`
9797
98- // Specifies the terminal container port for connection, defaults in 19200.
99- // +kubebuilder:default=19200
100- ContainerPort int32 `json:"containerPort,omitempty"`
98+ // Specifies the terminal container port for connection, defaults in 19200.
99+ // +kubebuilder:default=19200
100+ ContainerPort int32 `json:"containerPort,omitempty"`
101101
102- // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
103- ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
102+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
103+ ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
104104
105- IngressClassName string `json:"ingressClassName,omitempty"`
105+ IngressClassName string `json:"ingressClassName,omitempty"`
106106
107- // PublicProxyPorts specifies the public proxy ports for code server
108- PublicProxyPorts []int32 `json:"publicProxyPorts,omitempty"`
107+ // PublicProxyPorts specifies the public proxy ports for code server
108+ PublicProxyPorts []int32 `json:"publicProxyPorts,omitempty"`
109109
110- //InitCommand specifies the init commands that will be running to finish before code server running.
111- InitCommand string `json:"initCommand,omitempty"`
110+ //InitCommand specifies the init commands that will be running to finish before code server running.
111+ InitCommand string `json:"initCommand,omitempty"`
112112}
113113```
114114
115115## InitPlugins
116116
117117``` go
118118type gitPlugin struct {
119- Repourl string ` required:"true" json:"repourl"`
120- Branch string ` json:"branch"`
119+ Repourl string ` required:"true" json:"repourl"`
120+ Branch string ` json:"branch"`
121121}
122122```
123123
124124``` go
125125type copyDefaultConfigPlugin struct {
126- Image string ` required:"true" json:"image"`
126+ Image string ` required:"true" json:"image"`
127127}
128128```
129129
0 commit comments