freeleaps-ops/freeleaps-devops-reconciler/helm-pkg/reconciler/templates/crds/devopsprojects.yaml
zhenyus eae6ba99e2 refactor(devsvc): restructure reconciler Helm chart and remove deprecated files
- Deleted Jenkinsfile as CI/CD configuration is now handled differently.
- Updated Chart.yaml to reflect new service name and versioning.
- Enhanced values.yaml and values.alpha.yaml with comprehensive operator configuration and environment settings.
- Removed obsolete templates for deployment, service, ingress, and monitoring.
- Streamlined configuration for RabbitMQ, Jenkins, and ArgoCD integration.

Signed-off-by: zhenyus <zhenyus@mathmast.com>
2025-07-31 23:21:24 +08:00

145 lines
4.3 KiB
YAML

{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: devopsprojects.freeleaps.com
labels:
{{- include "freeleaps-devops-reconciler.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-5"
{{- if .Values.crds.keep }}
"helm.sh/resource-policy": keep
{{- end }}
spec:
group: freeleaps.com
scope: Namespaced
names:
kind: DevOpsProject
listKind: DevOpsProjectList
singular: devopsproject
plural: devopsprojects
shortNames:
- dop
- dops
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ['spec']
properties:
metadata:
type: object
properties:
name:
type: string
maxLength: 63
spec:
type: object
required:
- projectName
- projectId
- git
- registry
- environments
properties:
projectName:
type: string
description: "Human readable project name"
projectId:
type: string
description: "Unique project identifier"
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
git:
type: object
required:
- url
- branch
properties:
url:
type: string
description: "Git repository URL"
branch:
type: string
description: "Default git branch"
default: "main"
credentialsRef:
type: object
properties:
name:
type: string
namespace:
type: string
registry:
type: object
required:
- url
- project
properties:
url:
type: string
description: "Container registry URL"
project:
type: string
description: "Registry project/namespace"
credentialsRef:
type: object
properties:
name:
type: string
namespace:
type: string
environments:
type: array
items:
type: object
required:
- name
- branch
properties:
name:
type: string
enum: ["dev", "staging", "prod"]
branch:
type: string
autoSync:
type: boolean
default: false
status:
type: object
properties:
devopsProject:
type: object
properties:
status:
type: string
enum: ["invalid", "valid", "synced"]
synced:
type: boolean
ready:
type: boolean
lastProbeTime:
type: string
format: date-time
subresources:
status: {}
additionalPrinterColumns:
- name: Project ID
type: string
jsonPath: .spec.projectId
- name: Git URL
type: string
jsonPath: .spec.git.url
- name: Status
type: string
jsonPath: .status.devopsProject.status
- name: Ready
type: boolean
jsonPath: .status.devopsProject.ready
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
{{- end }}