Introduce new preview auto-scaling mode for ARC. (#2153)

Co-authored-by: Cory Miller <cory-miller@github.com>
Co-authored-by: Nikola Jokic <nikola-jokic@github.com>
Co-authored-by: Ava Stancu <AvaStancu@github.com>
Co-authored-by: Ferenc Hammerl <fhammerl@github.com>
Co-authored-by: Francesco Renzi <rentziass@github.com>
Co-authored-by: Bassem Dghaidi <Link-@github.com>
This commit is contained in:
Tingluo Huang
2023-01-17 12:06:20 -05:00
committed by GitHub
co-authored by Cory Miller Nikola Jokic Ava Stancu Ferenc Hammerl Francesco Renzi Bassem Dghaidi
parent 619667fc3b
commit 622eaa34f8
75 changed files with 26094 additions and 354 deletions
@@ -0,0 +1,97 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: autoscalinglisteners.actions.github.com
spec:
group: actions.github.com
names:
kind: AutoscalingListener
listKind: AutoscalingListenerList
plural: autoscalinglisteners
singular: autoscalinglistener
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.githubConfigUrl
name: GitHub Configure URL
type: string
- jsonPath: .spec.autoscalingRunnerSetNamespace
name: AutoscalingRunnerSet Namespace
type: string
- jsonPath: .spec.autoscalingRunnerSetName
name: AutoscalingRunnerSet Name
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: AutoscalingListener is the Schema for the autoscalinglisteners API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AutoscalingListenerSpec defines the desired state of AutoscalingListener
properties:
autoscalingRunnerSetName:
description: Required
type: string
autoscalingRunnerSetNamespace:
description: Required
type: string
ephemeralRunnerSetName:
description: Required
type: string
githubConfigSecret:
description: Required
type: string
githubConfigUrl:
description: Required
type: string
image:
description: Required
type: string
imagePullSecrets:
description: Required
items:
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
type: array
maxRunners:
description: Required
minimum: 0
type: integer
minRunners:
description: Required
minimum: 0
type: integer
runnerScaleSetId:
description: Required
type: integer
type: object
status:
description: AutoscalingListenerStatus defines the observed state of AutoscalingListener
type: object
type: object
served: true
storage: true
subresources:
status: {}
preserveUnknownFields: false
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -7,6 +7,10 @@ resources:
- bases/actions.summerwind.dev_runnerdeployments.yaml
- bases/actions.summerwind.dev_horizontalrunnerautoscalers.yaml
- bases/actions.summerwind.dev_runnersets.yaml
- bases/actions.github.com_autoscalingrunnersets.yaml
- bases/actions.github.com_ephemeralrunners.yaml
- bases/actions.github.com_ephemeralrunnersets.yaml
- bases/actions.github.com_autoscalinglisteners.yaml
# +kubebuilder:scaffold:crdkustomizeresource
patchesStrategicMerge:
+8
View File
@@ -50,6 +50,14 @@ spec:
optional: true
- name: GITHUB_APP_PRIVATE_KEY
value: /etc/actions-runner-controller/github_app_private_key
- name: CONTROLLER_MANAGER_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: CONTROLLER_MANAGER_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: controller-manager
mountPath: "/etc/actions-runner-controller"
@@ -0,0 +1,24 @@
# permissions for end users to edit autoscalinglisteners.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: autoscalinglistener-editor-role
rules:
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners/status
verbs:
- get
@@ -0,0 +1,20 @@
# permissions for end users to view autoscalinglisteners.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: autoscalinglistener-viewer-role
rules:
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners
verbs:
- get
- list
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners/status
verbs:
- get
@@ -0,0 +1,24 @@
# permissions for end users to edit autoscalingrunnersets.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: autoscalingrunnerset-editor-role
rules:
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets/status
verbs:
- get
@@ -0,0 +1,20 @@
# permissions for end users to view autoscalingrunnersets.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: autoscalingrunnerset-viewer-role
rules:
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets
verbs:
- get
- list
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets/status
verbs:
- get
@@ -0,0 +1,24 @@
# permissions for end users to edit ephemeralrunners.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ephemeralrunner-editor-role
rules:
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners/status
verbs:
- get
@@ -0,0 +1,20 @@
# permissions for end users to view ephemeralrunners.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ephemeralrunner-viewer-role
rules:
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners
verbs:
- get
- list
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners/status
verbs:
- get
@@ -0,0 +1,24 @@
# permissions for end users to edit ephemeralrunnersets.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ephemeralrunnerset-editor-role
rules:
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets/status
verbs:
- get
@@ -0,0 +1,20 @@
# permissions for end users to view ephemeralrunnersets.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ephemeralrunnerset-viewer-role
rules:
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets
verbs:
- get
- list
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets/status
verbs:
- get
+139
View File
@@ -6,6 +6,110 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners/finalizers
verbs:
- update
- apiGroups:
- actions.github.com
resources:
- autoscalinglisteners/status
verbs:
- get
- patch
- update
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets/finalizers
verbs:
- update
- apiGroups:
- actions.github.com
resources:
- autoscalingrunnersets/status
verbs:
- get
- patch
- update
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunners/status
verbs:
- get
- patch
- update
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- actions.github.com
resources:
- ephemeralrunnersets/status
verbs:
- get
- patch
- update
- apiGroups:
- actions.summerwind.dev
resources:
@@ -202,6 +306,26 @@ rules:
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- namespaces
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces/status
- pods/status
verbs:
- get
- apiGroups:
- ""
resources:
@@ -249,14 +373,22 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- ""
@@ -266,6 +398,8 @@ rules:
- create
- delete
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
@@ -274,6 +408,8 @@ rules:
- create
- delete
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
@@ -282,3 +418,6 @@ rules:
- create
- delete
- get
- list
- update
- watch