eff9f360f7
This switches from the ansible/dhall operator framework to kopf, an operator framework written in pure Python. This allows us to: * Build the operator application as a Python app. * Build the operator image using the opendev python builder images. * Run the operator as a Python CLI program "zuul-operator". * Write procedural Python code to handle operator tasks (such as creating new nodepool launchers when providers are added). * Use Jinja for templating config files and k8s resource files (direct pythonic manipulation of resources is an option too). The new CR nearly matches the existing one, with some minor differences. Some missing features and documentation are added in the commits immediately following; they should be reviewed and merged as a unit. Also, fx waiting for scheduler to settle in functional test since we changed this log line in Zuul. Change-Id: Ib37b67e3444b7cd44692d48eee77775ee9049e9f Change-Id: I70ec31ecd8fe264118215944022b2e7b513dced9
194 lines
4.6 KiB
YAML
194 lines
4.6 KiB
YAML
apiVersion: apiextensions.k8s.io/v1beta1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: perconaxtradbclusters.pxc.percona.com
|
|
spec:
|
|
group: pxc.percona.com
|
|
names:
|
|
kind: PerconaXtraDBCluster
|
|
listKind: PerconaXtraDBClusterList
|
|
plural: perconaxtradbclusters
|
|
singular: perconaxtradbcluster
|
|
shortNames:
|
|
- pxc
|
|
- pxcs
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1
|
|
storage: false
|
|
served: true
|
|
- name: v1-1-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-2-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-3-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-4-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-5-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-6-0
|
|
storage: false
|
|
served: true
|
|
- name: v1-7-0
|
|
storage: true
|
|
served: true
|
|
- name: v1alpha1
|
|
storage: false
|
|
served: true
|
|
additionalPrinterColumns:
|
|
- name: Endpoint
|
|
type: string
|
|
JSONPath: .status.host
|
|
- name: Status
|
|
type: string
|
|
JSONPath: .status.state
|
|
- name: PXC
|
|
type: string
|
|
description: Ready pxc nodes
|
|
JSONPath: .status.pxc.ready
|
|
- name: proxysql
|
|
type: string
|
|
description: Ready proxysql nodes
|
|
JSONPath: .status.proxysql.ready
|
|
- name: haproxy
|
|
type: string
|
|
description: Ready haproxy nodes
|
|
JSONPath: .status.haproxy.ready
|
|
- name: Age
|
|
type: date
|
|
JSONPath: .metadata.creationTimestamp
|
|
subresources:
|
|
status: {}
|
|
---
|
|
apiVersion: apiextensions.k8s.io/v1beta1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: perconaxtradbclusterbackups.pxc.percona.com
|
|
spec:
|
|
group: pxc.percona.com
|
|
names:
|
|
kind: PerconaXtraDBClusterBackup
|
|
listKind: PerconaXtraDBClusterBackupList
|
|
plural: perconaxtradbclusterbackups
|
|
singular: perconaxtradbclusterbackup
|
|
shortNames:
|
|
- pxc-backup
|
|
- pxc-backups
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1
|
|
storage: true
|
|
served: true
|
|
additionalPrinterColumns:
|
|
- name: Cluster
|
|
type: string
|
|
description: Cluster name
|
|
JSONPath: .spec.pxcCluster
|
|
- name: Storage
|
|
type: string
|
|
description: Storage name from pxc spec
|
|
JSONPath: .status.storageName
|
|
- name: Destination
|
|
type: string
|
|
description: Backup destination
|
|
JSONPath: .status.destination
|
|
- name: Status
|
|
type: string
|
|
description: Job status
|
|
JSONPath: .status.state
|
|
- name: Completed
|
|
description: Completed time
|
|
type: date
|
|
JSONPath: .status.completed
|
|
- name: Age
|
|
type: date
|
|
JSONPath: .metadata.creationTimestamp
|
|
subresources:
|
|
status: {}
|
|
---
|
|
apiVersion: apiextensions.k8s.io/v1beta1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: perconaxtradbclusterrestores.pxc.percona.com
|
|
spec:
|
|
group: pxc.percona.com
|
|
names:
|
|
kind: PerconaXtraDBClusterRestore
|
|
listKind: PerconaXtraDBClusterRestoreList
|
|
plural: perconaxtradbclusterrestores
|
|
singular: perconaxtradbclusterrestore
|
|
shortNames:
|
|
- pxc-restore
|
|
- pxc-restores
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1
|
|
storage: true
|
|
served: true
|
|
additionalPrinterColumns:
|
|
- name: Cluster
|
|
type: string
|
|
description: Cluster name
|
|
JSONPath: .spec.pxcCluster
|
|
- name: Status
|
|
type: string
|
|
description: Job status
|
|
JSONPath: .status.state
|
|
- name: Completed
|
|
description: Completed time
|
|
type: date
|
|
JSONPath: .status.completed
|
|
- name: Age
|
|
type: date
|
|
JSONPath: .metadata.creationTimestamp
|
|
subresources:
|
|
status: {}
|
|
---
|
|
apiVersion: apiextensions.k8s.io/v1beta1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
name: perconaxtradbbackups.pxc.percona.com
|
|
spec:
|
|
group: pxc.percona.com
|
|
names:
|
|
kind: PerconaXtraDBBackup
|
|
listKind: PerconaXtraDBBackupList
|
|
plural: perconaxtradbbackups
|
|
singular: perconaxtradbbackup
|
|
shortNames: []
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1alpha1
|
|
storage: true
|
|
served: true
|
|
additionalPrinterColumns:
|
|
- name: Cluster
|
|
type: string
|
|
description: Cluster name
|
|
JSONPath: .spec.pxcCluster
|
|
- name: Storage
|
|
type: string
|
|
description: Storage name from pxc spec
|
|
JSONPath: .status.storageName
|
|
- name: Destination
|
|
type: string
|
|
description: Backup destination
|
|
JSONPath: .status.destination
|
|
- name: Status
|
|
type: string
|
|
description: Job status
|
|
JSONPath: .status.state
|
|
- name: Completed
|
|
description: Completed time
|
|
type: date
|
|
JSONPath: .status.completed
|
|
- name: Age
|
|
type: date
|
|
JSONPath: .metadata.creationTimestamp
|