diff --git a/deploy/crd/app-crd.yaml b/deploy/crd/app-crd.yaml new file mode 100644 index 0000000..94addce --- /dev/null +++ b/deploy/crd/app-crd.yaml @@ -0,0 +1,127 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: apps.code.dev + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 +spec: + group: code.dev + names: + kind: App + listKind: AppList + plural: apps + singular: app + shortNames: + - app + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Replicas + jsonPath: .spec.replicas + type: integer + - name: Ready + jsonPath: .status.phase + type: string + - name: Age + jsonPath: .metadata.creationTimestamp + type: date + schema: + openAPIV3Schema: + type: object + required: [spec] + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + required: [] + properties: + image: + type: string + default: myapp/app:latest + replicas: + type: integer + default: 3 + env: + type: array + items: + type: object + required: [name] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretRef: + type: object + required: [name, secretName, secretKey] + properties: + name: + type: string + secretName: + type: string + secretKey: + type: string + resources: + type: object + properties: + requests: + type: object + properties: + cpu: + type: string + memory: + type: string + limits: + type: object + properties: + cpu: + type: string + memory: + type: string + livenessProbe: + type: object + properties: + port: + type: integer + default: 8080 + path: + type: string + default: /health + initialDelaySeconds: + type: integer + default: 5 + readinessProbe: + type: object + properties: + port: + type: integer + default: 8080 + path: + type: string + default: /health + initialDelaySeconds: + type: integer + default: 5 + imagePullPolicy: + type: string + default: IfNotPresent + status: + type: object + properties: + readyReplicas: + type: integer + phase: + type: string diff --git a/deploy/crd/email-worker-crd.yaml b/deploy/crd/email-worker-crd.yaml new file mode 100644 index 0000000..ba22be2 --- /dev/null +++ b/deploy/crd/email-worker-crd.yaml @@ -0,0 +1,94 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: emailworkers.code.dev + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 +spec: + group: code.dev + names: + kind: EmailWorker + listKind: EmailWorkerList + plural: emailworkers + singular: emailworker + shortNames: + - ew + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Age + jsonPath: .metadata.creationTimestamp + type: date + schema: + openAPIV3Schema: + type: object + required: [spec] + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + required: [] + properties: + image: + type: string + default: myapp/email-worker:latest + env: + type: array + items: + type: object + required: [name] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretRef: + type: object + required: [name, secretName, secretKey] + properties: + name: + type: string + secretName: + type: string + secretKey: + type: string + resources: + type: object + properties: + requests: + type: object + properties: + cpu: + type: string + memory: + type: string + limits: + type: object + properties: + cpu: + type: string + memory: + type: string + imagePullPolicy: + type: string + default: IfNotPresent + status: + type: object + properties: + readyReplicas: + type: integer + phase: + type: string diff --git a/deploy/crd/git-hook-crd.yaml b/deploy/crd/git-hook-crd.yaml new file mode 100644 index 0000000..7123c85 --- /dev/null +++ b/deploy/crd/git-hook-crd.yaml @@ -0,0 +1,96 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: githooks.code.dev + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 +spec: + group: code.dev + names: + kind: GitHook + listKind: GitHookList + plural: githooks + singular: githook + shortNames: + - ghk + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Age + jsonPath: .metadata.creationTimestamp + type: date + schema: + openAPIV3Schema: + type: object + required: [spec] + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + required: [] + properties: + image: + type: string + default: myapp/git-hook:latest + env: + type: array + items: + type: object + required: [name] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretRef: + type: object + required: [name, secretName, secretKey] + properties: + name: + type: string + secretName: + type: string + secretKey: + type: string + resources: + type: object + properties: + requests: + type: object + properties: + cpu: + type: string + memory: + type: string + limits: + type: object + properties: + cpu: + type: string + memory: + type: string + imagePullPolicy: + type: string + default: IfNotPresent + workerId: + type: string + status: + type: object + properties: + readyReplicas: + type: integer + phase: + type: string diff --git a/deploy/crd/gitserver-crd.yaml b/deploy/crd/gitserver-crd.yaml new file mode 100644 index 0000000..fa60874 --- /dev/null +++ b/deploy/crd/gitserver-crd.yaml @@ -0,0 +1,108 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: gitservers.code.dev + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 +spec: + group: code.dev + names: + kind: GitServer + listKind: GitServerList + plural: gitservers + singular: gitserver + shortNames: + - gs + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Age + jsonPath: .metadata.creationTimestamp + type: date + schema: + openAPIV3Schema: + type: object + required: [spec] + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + required: [] + properties: + image: + type: string + default: myapp/gitserver:latest + env: + type: array + items: + type: object + required: [name] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretRef: + type: object + required: [name, secretName, secretKey] + properties: + name: + type: string + secretName: + type: string + secretKey: + type: string + resources: + type: object + properties: + requests: + type: object + properties: + cpu: + type: string + memory: + type: string + limits: + type: object + properties: + cpu: + type: string + memory: + type: string + sshServiceType: + type: string + default: NodePort + storageSize: + type: string + default: 10Gi + imagePullPolicy: + type: string + default: IfNotPresent + sshDomain: + type: string + sshPort: + type: integer + default: 22 + httpPort: + type: integer + default: 8022 + status: + type: object + properties: + readyReplicas: + type: integer + phase: + type: string diff --git a/deploy/crd/migrate-crd.yaml b/deploy/crd/migrate-crd.yaml new file mode 100644 index 0000000..255d150 --- /dev/null +++ b/deploy/crd/migrate-crd.yaml @@ -0,0 +1,87 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: migrates.code.dev + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 +spec: + group: code.dev + names: + kind: Migrate + listKind: MigrateList + plural: migrates + singular: migrate + shortNames: + - mig + scope: Namespaced + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Status + jsonPath: .status.phase + type: string + - name: Age + jsonPath: .metadata.creationTimestamp + type: date + schema: + openAPIV3Schema: + type: object + required: [spec] + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + required: [] + properties: + image: + type: string + default: myapp/migrate:latest + env: + type: array + description: "Must include APP_DATABASE_URL" + items: + type: object + required: [name] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretRef: + type: object + required: [name, secretName, secretKey] + properties: + name: + type: string + secretName: + type: string + secretKey: + type: string + command: + type: string + default: up + description: "Migration command: up, down, fresh, refresh, reset" + backoffLimit: + type: integer + default: 3 + status: + type: object + properties: + phase: + type: string + startTime: + type: string + completionTime: + type: string