feat: scaffold job execution API
Verify / lint (pull_request) Failing after 5m37s
Verify / test (pull_request) Successful in 5m38s

This commit is contained in:
2026-09-17 18:58:11 +00:00
parent 7a47221280
commit 4846ff2aba
65 changed files with 4555 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over execution.ayatori.ddupan.top.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-job-admin-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs
verbs:
- '*'
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs/status
verbs:
- get
@@ -0,0 +1,33 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the execution.ayatori.ddupan.top.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-job-editor-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs/status
verbs:
- get
@@ -0,0 +1,29 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to execution.ayatori.ddupan.top resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-job-viewer-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobs/status
verbs:
- get
@@ -0,0 +1,27 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over execution.ayatori.ddupan.top.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-jobclass-admin-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses
verbs:
- '*'
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses/status
verbs:
- get
@@ -0,0 +1,33 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the execution.ayatori.ddupan.top.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-jobclass-editor-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses/status
verbs:
- get
@@ -0,0 +1,29 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to execution.ayatori.ddupan.top resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-jobclass-viewer-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses
verbs:
- get
- list
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- jobclasses/status
verbs:
- get
@@ -0,0 +1,27 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over execution.ayatori.ddupan.top.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-kubernetesexecutionparameters-admin-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters
verbs:
- '*'
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters/status
verbs:
- get
@@ -0,0 +1,33 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the execution.ayatori.ddupan.top.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-kubernetesexecutionparameters-editor-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters/status
verbs:
- get
@@ -0,0 +1,29 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to execution.ayatori.ddupan.top resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-kubernetesexecutionparameters-viewer-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters
verbs:
- get
- list
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- kubernetesexecutionparameters/status
verbs:
- get
@@ -0,0 +1,27 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over execution.ayatori.ddupan.top.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-opensandboxexecutionparameters-admin-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters
verbs:
- '*'
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters/status
verbs:
- get
@@ -0,0 +1,33 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the execution.ayatori.ddupan.top.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-opensandboxexecutionparameters-editor-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters/status
verbs:
- get
@@ -0,0 +1,29 @@
# This rule is not used by the project ayatori itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to execution.ayatori.ddupan.top resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: execution-opensandboxexecutionparameters-viewer-role
rules:
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters
verbs:
- get
- list
- watch
- apiGroups:
- execution.ayatori.ddupan.top
resources:
- opensandboxexecutionparameters/status
verbs:
- get
+36
View File
@@ -0,0 +1,36 @@
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
# The following RBAC configurations are used to protect
# the metrics endpoint with authn/authz. These configurations
# ensure that only authorized users and service accounts
# can access the metrics endpoint. Comment the following
# permissions if you want to disable this protection.
# More info: https://book.kubebuilder.io/reference/metrics.html
- metrics_auth_role.yaml
- metrics_auth_role_binding.yaml
- metrics_reader_role.yaml
# For each CRD, "Admin", "Editor" and "Viewer" roles are scaffolded by
# default, aiding admins in cluster management. Those roles are
# not used by the ayatori itself. You can comment the following lines
# if you do not want those helpers be installed with your Project.
- execution_opensandboxexecutionparameters_admin_role.yaml
- execution_opensandboxexecutionparameters_editor_role.yaml
- execution_opensandboxexecutionparameters_viewer_role.yaml
- execution_kubernetesexecutionparameters_admin_role.yaml
- execution_kubernetesexecutionparameters_editor_role.yaml
- execution_kubernetesexecutionparameters_viewer_role.yaml
- execution_jobclass_admin_role.yaml
- execution_jobclass_editor_role.yaml
- execution_jobclass_viewer_role.yaml
- execution_job_admin_role.yaml
- execution_job_editor_role.yaml
- execution_job_viewer_role.yaml
+40
View File
@@ -0,0 +1,40 @@
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
+17
View File
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: metrics-auth-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: metrics-auth-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: metrics-auth-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
+9
View File
@@ -0,0 +1,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: metrics-reader
rules:
- nonResourceURLs:
- "/metrics"
verbs:
- get
+11
View File
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: manager-role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
+15
View File
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
+8
View File
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: ayatori
app.kubernetes.io/managed-by: kustomize
name: controller-manager
namespace: system