|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + cert-manager.io/inject-ca-from: code-server-operator-system/code-server-operator-serving-cert |
| 6 | + controller-gen.kubebuilder.io/version: v0.14.0 |
| 7 | + name: codeserverdeployments.cs.walnuts.dev |
| 8 | +spec: |
| 9 | + group: cs.walnuts.dev |
| 10 | + names: |
| 11 | + kind: CodeServerDeployment |
| 12 | + listKind: CodeServerDeploymentList |
| 13 | + plural: codeserverdeployments |
| 14 | + singular: codeserverdeployment |
| 15 | + scope: Namespaced |
| 16 | + versions: |
| 17 | + - name: v1alpha1 |
| 18 | + schema: |
| 19 | + openAPIV3Schema: |
| 20 | + description: CodeServerDeployment is the Schema for the codeserverdeployments |
| 21 | + API |
| 22 | + properties: |
| 23 | + apiVersion: |
| 24 | + description: |- |
| 25 | + APIVersion defines the versioned schema of this representation of an object. |
| 26 | + Servers should convert recognized schemas to the latest internal value, and |
| 27 | + may reject unrecognized values. |
| 28 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 29 | + type: string |
| 30 | + kind: |
| 31 | + description: |- |
| 32 | + Kind is a string value representing the REST resource this object represents. |
| 33 | + Servers may infer this from the endpoint the client submits requests to. |
| 34 | + Cannot be updated. |
| 35 | + In CamelCase. |
| 36 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 37 | + type: string |
| 38 | + metadata: |
| 39 | + type: object |
| 40 | + spec: |
| 41 | + description: CodeServerDeploymentSpec defines the desired state of CodeServerDeployment |
| 42 | + properties: |
| 43 | + replicas: |
| 44 | + format: int32 |
| 45 | + type: integer |
| 46 | + template: |
| 47 | + properties: |
| 48 | + spec: |
| 49 | + description: CodeServerSpec defines the desired state of CodeServer |
| 50 | + properties: |
| 51 | + containerPort: |
| 52 | + default: 19200 |
| 53 | + description: Specifies the terminal container port for connection, |
| 54 | + defaults in 19200. |
| 55 | + format: int32 |
| 56 | + type: integer |
| 57 | + domain: |
| 58 | + description: Specifies the domain for code server |
| 59 | + type: string |
| 60 | + envs: |
| 61 | + description: Specifies the envs |
| 62 | + items: |
| 63 | + description: EnvVar represents an environment variable present |
| 64 | + in a Container. |
| 65 | + properties: |
| 66 | + name: |
| 67 | + description: Name of the environment variable. Must |
| 68 | + be a C_IDENTIFIER. |
| 69 | + type: string |
| 70 | + value: |
| 71 | + description: |- |
| 72 | + Variable references $(VAR_NAME) are expanded |
| 73 | + using the previously defined environment variables in the container and |
| 74 | + any service environment variables. If a variable cannot be resolved, |
| 75 | + the reference in the input string will be unchanged. Double $$ are reduced |
| 76 | + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. |
| 77 | + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". |
| 78 | + Escaped references will never be expanded, regardless of whether the variable |
| 79 | + exists or not. |
| 80 | + Defaults to "". |
| 81 | + type: string |
| 82 | + valueFrom: |
| 83 | + description: Source for the environment variable's value. |
| 84 | + Cannot be used if value is not empty. |
| 85 | + properties: |
| 86 | + configMapKeyRef: |
| 87 | + description: Selects a key of a ConfigMap. |
| 88 | + properties: |
| 89 | + key: |
| 90 | + description: The key to select. |
| 91 | + type: string |
| 92 | + name: |
| 93 | + description: |- |
| 94 | + Name of the referent. |
| 95 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 96 | + TODO: Add other useful fields. apiVersion, kind, uid? |
| 97 | + type: string |
| 98 | + optional: |
| 99 | + description: Specify whether the ConfigMap or |
| 100 | + its key must be defined |
| 101 | + type: boolean |
| 102 | + required: |
| 103 | + - key |
| 104 | + type: object |
| 105 | + x-kubernetes-map-type: atomic |
| 106 | + fieldRef: |
| 107 | + description: |- |
| 108 | + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, |
| 109 | + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. |
| 110 | + properties: |
| 111 | + apiVersion: |
| 112 | + description: Version of the schema the FieldPath |
| 113 | + is written in terms of, defaults to "v1". |
| 114 | + type: string |
| 115 | + fieldPath: |
| 116 | + description: Path of the field to select in |
| 117 | + the specified API version. |
| 118 | + type: string |
| 119 | + required: |
| 120 | + - fieldPath |
| 121 | + type: object |
| 122 | + x-kubernetes-map-type: atomic |
| 123 | + resourceFieldRef: |
| 124 | + description: |- |
| 125 | + Selects a resource of the container: only resources limits and requests |
| 126 | + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. |
| 127 | + properties: |
| 128 | + containerName: |
| 129 | + description: 'Container name: required for volumes, |
| 130 | + optional for env vars' |
| 131 | + type: string |
| 132 | + divisor: |
| 133 | + anyOf: |
| 134 | + - type: integer |
| 135 | + - type: string |
| 136 | + description: Specifies the output format of |
| 137 | + the exposed resources, defaults to "1" |
| 138 | + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ |
| 139 | + x-kubernetes-int-or-string: true |
| 140 | + resource: |
| 141 | + description: 'Required: resource to select' |
| 142 | + type: string |
| 143 | + required: |
| 144 | + - resource |
| 145 | + type: object |
| 146 | + x-kubernetes-map-type: atomic |
| 147 | + secretKeyRef: |
| 148 | + description: Selects a key of a secret in the pod's |
| 149 | + namespace |
| 150 | + properties: |
| 151 | + key: |
| 152 | + description: The key of the secret to select |
| 153 | + from. Must be a valid secret key. |
| 154 | + type: string |
| 155 | + name: |
| 156 | + description: |- |
| 157 | + Name of the referent. |
| 158 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 159 | + TODO: Add other useful fields. apiVersion, kind, uid? |
| 160 | + type: string |
| 161 | + optional: |
| 162 | + description: Specify whether the Secret or its |
| 163 | + key must be defined |
| 164 | + type: boolean |
| 165 | + required: |
| 166 | + - key |
| 167 | + type: object |
| 168 | + x-kubernetes-map-type: atomic |
| 169 | + type: object |
| 170 | + required: |
| 171 | + - name |
| 172 | + type: object |
| 173 | + type: array |
| 174 | + image: |
| 175 | + default: ghcr.io/coder/code-server:latest |
| 176 | + description: Specifies the image used to running code server |
| 177 | + type: string |
| 178 | + imagePullSecrets: |
| 179 | + description: ImagePullSecrets is an optional list of references |
| 180 | + to secrets in the same namespace to use for pulling any |
| 181 | + of the images used by this PodSpec. |
| 182 | + items: |
| 183 | + description: |- |
| 184 | + LocalObjectReference contains enough information to let you locate the |
| 185 | + referenced object inside the same namespace. |
| 186 | + properties: |
| 187 | + name: |
| 188 | + description: |- |
| 189 | + Name of the referent. |
| 190 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 191 | + TODO: Add other useful fields. apiVersion, kind, uid? |
| 192 | + type: string |
| 193 | + type: object |
| 194 | + x-kubernetes-map-type: atomic |
| 195 | + type: array |
| 196 | + initPlugins: |
| 197 | + additionalProperties: |
| 198 | + additionalProperties: |
| 199 | + type: string |
| 200 | + type: object |
| 201 | + description: Specifies the init plugins that will be running |
| 202 | + to finish before code server running. |
| 203 | + type: object |
| 204 | + nodeSelector: |
| 205 | + additionalProperties: |
| 206 | + type: string |
| 207 | + description: Specifies the node selector for scheduling. |
| 208 | + type: object |
| 209 | + resources: |
| 210 | + description: Specifies the resource requirements for code |
| 211 | + server pod. |
| 212 | + properties: |
| 213 | + claims: |
| 214 | + description: |- |
| 215 | + Claims lists the names of resources, defined in spec.resourceClaims, |
| 216 | + that are used by this container. |
| 217 | +
|
| 218 | +
|
| 219 | + This is an alpha field and requires enabling the |
| 220 | + DynamicResourceAllocation feature gate. |
| 221 | +
|
| 222 | +
|
| 223 | + This field is immutable. It can only be set for containers. |
| 224 | + items: |
| 225 | + description: ResourceClaim references one entry in PodSpec.ResourceClaims. |
| 226 | + properties: |
| 227 | + name: |
| 228 | + description: |- |
| 229 | + Name must match the name of one entry in pod.spec.resourceClaims of |
| 230 | + the Pod where this field is used. It makes that resource available |
| 231 | + inside a container. |
| 232 | + type: string |
| 233 | + required: |
| 234 | + - name |
| 235 | + type: object |
| 236 | + type: array |
| 237 | + x-kubernetes-list-map-keys: |
| 238 | + - name |
| 239 | + x-kubernetes-list-type: map |
| 240 | + limits: |
| 241 | + additionalProperties: |
| 242 | + anyOf: |
| 243 | + - type: integer |
| 244 | + - type: string |
| 245 | + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ |
| 246 | + x-kubernetes-int-or-string: true |
| 247 | + description: |- |
| 248 | + Limits describes the maximum amount of compute resources allowed. |
| 249 | + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| 250 | + type: object |
| 251 | + requests: |
| 252 | + additionalProperties: |
| 253 | + anyOf: |
| 254 | + - type: integer |
| 255 | + - type: string |
| 256 | + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ |
| 257 | + x-kubernetes-int-or-string: true |
| 258 | + description: |- |
| 259 | + Requests describes the minimum amount of compute resources required. |
| 260 | + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, |
| 261 | + otherwise to an implementation-defined value. Requests cannot exceed Limits. |
| 262 | + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| 263 | + type: object |
| 264 | + type: object |
| 265 | + storageAnnotations: |
| 266 | + additionalProperties: |
| 267 | + type: string |
| 268 | + description: Specifies the additional annotations for persistent |
| 269 | + volume claim |
| 270 | + type: object |
| 271 | + storageClassName: |
| 272 | + description: Specifies the storage class name for persistent |
| 273 | + volume claim |
| 274 | + type: string |
| 275 | + storageSize: |
| 276 | + default: 1Gi |
| 277 | + description: Specifies the storage size that will be used |
| 278 | + for code server |
| 279 | + pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$ |
| 280 | + type: string |
| 281 | + suspendAfterSeconds: |
| 282 | + description: Specifies the period before controller suspend |
| 283 | + the resources (delete all resources except data). |
| 284 | + format: int64 |
| 285 | + type: integer |
| 286 | + volumeName: |
| 287 | + description: VolumeName specifies the volume name for persistent |
| 288 | + volume claim |
| 289 | + type: string |
| 290 | + type: object |
| 291 | + required: |
| 292 | + - spec |
| 293 | + type: object |
| 294 | + required: |
| 295 | + - replicas |
| 296 | + - template |
| 297 | + type: object |
| 298 | + status: |
| 299 | + description: CodeServerDeploymentStatus defines the observed state of |
| 300 | + CodeServerDeployment |
| 301 | + type: object |
| 302 | + type: object |
| 303 | + served: true |
| 304 | + storage: true |
| 305 | + subresources: |
| 306 | + status: {} |
0 commit comments