- operator-sdk init + create api (QueueService kind, group sqs, v1alpha1) - Стандартная kubebuilder структура: cmd/, internal/controller/, config/ - CRD types с kubebuilder маркерами (validation, defaults, printcolumns) - Reconciler перенесён из ручного кода в internal/controller/ - controller-gen v0.17.0 (совместимость с Go 1.26.1) - Автогенерация: deepcopy, CRD YAML, RBAC ClusterRole - Удалены все ручные файлы (controllers/, main.go, deployments/)
25 lines
1020 B
YAML
25 lines
1020 B
YAML
resources:
|
|
# All RBAC will be applied under this service account in
|
|
# the deployment namespace. You may comment out this resource
|
|
# if your manager will use a service account that exists at
|
|
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
|
|
# subjects if changing service account names.
|
|
- service_account.yaml
|
|
- role.yaml
|
|
- role_binding.yaml
|
|
- leader_election_role.yaml
|
|
- leader_election_role_binding.yaml
|
|
# Comment the following 4 lines if you want to disable
|
|
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
|
|
# which protects your /metrics endpoint.
|
|
- auth_proxy_service.yaml
|
|
- auth_proxy_role.yaml
|
|
- auth_proxy_role_binding.yaml
|
|
- auth_proxy_client_clusterrole.yaml
|
|
# For each CRD, "Editor" and "Viewer" roles are scaffolded by
|
|
# default, aiding admins in cluster management. Those roles are
|
|
# not used by the Project itself. You can comment the following lines
|
|
# if you do not want those helpers be installed with your Project.
|
|
- queueservice_editor_role.yaml
|
|
- queueservice_viewer_role.yaml
|