diff --git a/api/v1beta1/gitlab_types.go b/api/v1beta1/gitlab_types.go index 6560618..04f5e8d 100644 --- a/api/v1beta1/gitlab_types.go +++ b/api/v1beta1/gitlab_types.go @@ -70,7 +70,7 @@ type KubernetesConfig struct { ResourceAvailabilityCheckMaxAttempts int `toml:"resource_availability_check_max_attempts,omitzero" json:"resource_availability_check_max_attempts,omitempty" long:"resource-availability-check-max-attempts" env:"KUBERNETES_RESOURCE_AVAILABILITY_CHECK_MAX_ATTEMPTS" default:"5" description:"The maximum number of attempts to check if a resource (service account and/or pull secret) set is available before giving up. There is 5 seconds interval between each attempt"` PodLabels map[string]string `toml:"pod_labels,omitempty" json:"pod_labels,omitempty" long:"pod-labels" description:"A toml table/json object of key-value. Value is expected to be a string. When set, this will create pods with the given pod labels. Environment variables will be substituted for values here."` PodLabelsOverwriteAllowed string `toml:"pod_labels_overwrite_allowed" json:"pod_labels_overwrite_allowed,omitempty" long:"pod_labels_overwrite_allowed" env:"KUBERNETES_POD_LABELS_OVERWRITE_ALLOWED" description:"Regex to validate 'KUBERNETES_POD_LABELS_*' values"` - SchedulerName string `toml:"scheduler_name,omitempty" json:"scheduler_name" long:"scheduler-name,omitempty" env:"KUBERNETES_SCHEDULER_NAME" description:"Pods will be scheduled using this scheduler, if it exists"` + SchedulerName string `toml:"scheduler_name,omitempty" json:"scheduler_name,omitempty" long:"scheduler-name,omitempty" env:"KUBERNETES_SCHEDULER_NAME" description:"Pods will be scheduled using this scheduler, if it exists"` ServiceAccount string `toml:"service_account,omitempty" json:"service_account,omitempty" long:"service-account" env:"KUBERNETES_SERVICE_ACCOUNT" description:"Executor pods will use this Service Account to talk to kubernetes API"` ServiceAccountOverwriteAllowed string `toml:"service_account_overwrite_allowed,omitempty" json:"service_account_overwrite_allowed,omitempty" long:"service_account_overwrite_allowed" env:"KUBERNETES_SERVICE_ACCOUNT_OVERWRITE_ALLOWED" description:"Regex to validate 'KUBERNETES_SERVICE_ACCOUNT' value"` PodAnnotations map[string]string `toml:"pod_annotations,omitempty" json:"pod_annotations,omitempty" long:"pod-annotations" description:"A toml table/json object of key-value. Value is expected to be a string. When set, this will create pods with the given annotations. Can be overwritten in build with KUBERNETES_POD_ANNOTATION_* variables"` diff --git a/config/crd/bases/gitlab.k8s.alekc.dev_multirunners.yaml b/config/crd/bases/gitlab.k8s.alekc.dev_multirunners.yaml index 69646d7..114cb4a 100644 --- a/config/crd/bases/gitlab.k8s.alekc.dev_multirunners.yaml +++ b/config/crd/bases/gitlab.k8s.alekc.dev_multirunners.yaml @@ -985,8 +985,6 @@ spec: type: object type: array type: object - required: - - scheduler_name type: object name: type: string diff --git a/config/crd/bases/gitlab.k8s.alekc.dev_runners.yaml b/config/crd/bases/gitlab.k8s.alekc.dev_runners.yaml index ab1e024..4e8c5d2 100644 --- a/config/crd/bases/gitlab.k8s.alekc.dev_runners.yaml +++ b/config/crd/bases/gitlab.k8s.alekc.dev_runners.yaml @@ -984,8 +984,6 @@ spec: type: object type: array type: object - required: - - scheduler_name type: object gitlab_instance_url: type: string diff --git a/config/samples/dind.yaml b/config/samples/dind.yaml new file mode 100644 index 0000000..5cefb86 --- /dev/null +++ b/config/samples/dind.yaml @@ -0,0 +1,29 @@ +apiVersion: gitlab.k8s.alekc.dev/v1beta1 +kind: Runner +metadata: + labels: + argocd.argoproj.io/instance: gitlab-runner + name: dind +spec: + check_interval: 5 + concurrent: 10 + executor_config: + cpu_request: '0.5' + memory_request: 150Mi + node_selector: + kubernetes.io/arch: amd64 + privileged: true + volumes: + empty_dir: + - medium: Memory + mount_path: /certs/client + name: docker-certs + gitlab_instance_url: 'https://gitlab.com/' + log_level: debug + registration_config: + tag_list: + - dev + - k8s + - amd64 + - dind + token: xxxxx