Commit eb49d694 authored by Edmund Ochieng's avatar Edmund Ochieng

Merge branch 'bundle' into 'master'

Create initial operator bundle

See merge request !14
parents bb66b7a1 052aae50
Pipeline #184999758 passed with stages
in 11 minutes and 19 seconds
......@@ -26,7 +26,7 @@ type GitLabSpec struct {
Release string `json:"release,omitempty"`
URL string `json:"url,omitempty"`
TLS string `json:"tls,omitempty"`
SMTP SMTPConfiguration `json:"email,omitempty"`
SMTP SMTPConfiguration `json:"smtp,omitempty"`
Registry RegistrySpec `json:"registry,omitempty"`
ObjectStore ObjectStoreSpec `json:"objectStore,omitempty"`
Redis *RedisSpec `json:"redis,omitempty"`
......
FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=gitlab-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.0.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/
This diff is collapsed.
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: glbackups.apps.gitlab.com
spec:
group: apps.gitlab.com
names:
kind: GLBackup
listKind: GLBackupList
plural: glbackups
shortNames:
- gbk
singular: glbackup
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: GLBackup is the Schema for the glbackups 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: GLBackupSpec defines the desired state of GLBackup
properties:
instance:
description: Instance represents the GitLab instance to backup
type: string
restore:
description: 'Restore when set to true the backup defined by ID: will be restored to the gitlab instance'
type: boolean
schedule:
description: Schedule defines the time and day to run backup It takes cron time format
type: string
skip:
description: Exclusions allows user to exclude components to backup
type: string
timestamp:
description: Timestamp defines the prefix of the backup job
type: string
url:
description: URL defines the address of the backup job
type: string
required:
- instance
type: object
status:
description: GLBackupStatus defines the observed state of GLBackup
properties:
completedAt:
description: Completed returns time backup terminated or completed
type: string
phase:
description: BackupState informs of current backup state
enum:
- Running
- Completed
- Scheduled
- Failed
type: string
startedAt:
description: StartedAt returns time when backup was initiated
type: string
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: runners.apps.gitlab.com
spec:
group: apps.gitlab.com
names:
kind: Runner
listKind: RunnerList
plural: runners
singular: runner
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: Runner is the Schema for the runners 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: RunnerSpec defines the desired state of Runner
properties:
cache:
description: Cache defines an S3 compatible object store
properties:
bucket:
description: Bucket defines the s3 bucket name
type: string
credentials:
description: Credentials is the name of the secret containing the
type: string
insecure:
description: Insecure enables use of HTTP protocol
type: boolean
path:
description: Path defines the Runner Cache path
type: string
region:
description: Region for the cache
type: string
server:
description: S3 cache server URL
type: string
type: object
gitlab:
description: GitlabResource represents a Gitlab custom resource. Should only be used to reference Gitlab instance created by the operator
properties:
name:
description: Name of gitlab resource in kubernetes / openshift
type: string
url:
description: Gitlab or Continuous Integration URL
type: string
type: object
tags:
description: Tags passes the runner tags
type: string
token:
description: RegistrationToken is name of secret with the runner-registration-token key used to register the runner
type: string
type: object
status:
description: RunnerStatus defines the observed state of Runner
properties:
phase:
type: string
registration:
type: string
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: gitlab-leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: null
name: gitlab-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: gitlab-leader-election-role
subjects:
- kind: ServiceAccount
name: default
namespace: gitlab-operator
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: gitlab-manager-role
rules:
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.gitlab.com
resources:
- gitlabs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.gitlab.com
resources:
- gitlabs/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.gitlab.com
resources:
- glbackups
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.gitlab.com
resources:
- glbackups/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.gitlab.com
resources:
- runners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.gitlab.com
resources:
- runners/status
verbs:
- get
- patch
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- cronjobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monitoring.coreos.com
resources:
- prometheuses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: gitlab-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: gitlab-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: gitlab-operator
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
creationTimestamp: null
name: gitlab-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
This diff is collapsed.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: gitlab-proxy-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: gitlab-proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: gitlab-proxy-role
subjects:
- kind: ServiceAccount
name: default
namespace: gitlab-operator
annotations:
operators.operatorframework.io.bundle.channel.default.v1: ""
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: gitlab-operator
operators.operatorframework.io.metrics.builder: operator-sdk-v1.0.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2
operators.operatorframework.io.test.config.v1: tests/scorecard/
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
apiVersion: scorecard.operatorframework.io/v1alpha3
kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:master
labels:
suite: basic
test: basic-check-spec-test
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:master
labels:
suite: olm
test: olm-bundle-validation-test
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:master
labels:
suite: olm
test: olm-crds-have-validation-test
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:master
labels:
suite: olm
test: olm-crds-have-resources-test
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:master
labels:
suite: olm
test: olm-spec-descriptors-test
- entrypoint: