Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8SPSMDB-1183 bundle generations for psmdb #1681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* @hors @egegunes @inelpandzic @pooknull
/e2e-tests/ @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007
Jenkinsfile @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007
* @hors @egegunes @inelpandzic @pooknull @nmarukovich
/e2e-tests/ @nmarukovich @ptankov @jvpasinatto @eleo007
Jenkinsfile @nmarukovich @ptankov @jvpasinatto @eleo007
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ updates:
time: "01:00"
reviewers:
- hors
- tplavcic
- nmarukovich
ignore:
# ignore patch updates for all dependencies
- dependency-name: "*"
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,7 @@ bin/
### VisualStudioCode ###
.vscode/*
.history

projects/
installers/olm/operator_*.yaml
installers/olm/bundles
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void createCluster(String CLUSTER_SUFFIX) {
gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE
gcloud config set project $GCP_PROJECT
gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $region --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $region --quiet || true
gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.27 --machine-type=n1-standard-4 --preemptible --num-nodes=3 --network=jenkins-vpc --subnetwork=jenkins-${CLUSTER_SUFFIX} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 --enable-ip-alias --workload-pool=cloud-dev-112233.svc.id.goog && \
gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.28 --machine-type=n1-standard-4 --preemptible --num-nodes=3 --network=jenkins-vpc --subnetwork=jenkins-${CLUSTER_SUFFIX} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 --enable-ip-alias --workload-pool=cloud-dev-112233.svc.id.goog && \
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user jenkins@"$GCP_PROJECT".iam.gserviceaccount.com || ret_val=\$?
if [ \${ret_val} -eq 0 ]; then break; fi
ret_num=\$((ret_num + 1))
Expand Down
10 changes: 10 additions & 0 deletions config/bundle/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../crd
- ../rbac/namespace
- ../manager/namespace
images:
- name: percona-server-mongodb-operator
newName: perconalab/percona-server-mongodb-operator
newTag: main
5 changes: 5 additions & 0 deletions config/community/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../operator
13 changes: 13 additions & 0 deletions config/manager/cluster/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manager-cluster.yaml
commonLabels:
app.kubernetes.io/component: operator
app.kubernetes.io/instance: percona-server-mongodb-operator
app.kubernetes.io/name: percona-server-mongodb-operator
app.kubernetes.io/part-of: percona-server-mongodb-operator
images:
- name: psmdb-operator
newName: tishina/percona-server-mongodb-operator
newTag: main
48 changes: 48 additions & 0 deletions config/manager/cluster/manager-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: percona-server-mongodb-operator
spec:
replicas: 1
selector:
matchLabels:
name: percona-server-mongodb-operator
template:
metadata:
labels:
name: percona-server-mongodb-operator
spec:
serviceAccountName: percona-server-mongodb-operator
containers:
- name: percona-server-mongodb-operator
image: perconalab/percona-server-mongodb-operator:main
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /metrics
port: metrics
scheme: HTTP
ports:
- containerPort: 8080
protocol: TCP
name: metrics
command:
- percona-server-mongodb-operator
env:
- name: LOG_STRUCTURED
value: 'false'
- name: LOG_LEVEL
value: INFO
- name: WATCH_NAMESPACE
value: ""
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: percona-server-mongodb-operator
- name: RESYNC_PERIOD
value: 5s
- name: DISABLE_TELEMETRY
value: "false"
13 changes: 13 additions & 0 deletions config/manager/namespace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manager-namespace.yaml
commonLabels:
app.kubernetes.io/component: operator
app.kubernetes.io/instance: percona-server-mongodb-operator
app.kubernetes.io/name: percona-server-mongodb-operator
app.kubernetes.io/part-of: percona-server-mongodb-operator
images:
- name: psmdb-operator
newName: tishina/percona-server-mongodb-operator
newTag: main
50 changes: 50 additions & 0 deletions config/manager/namespace/manager-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: percona-server-mongodb-operator
spec:
replicas: 1
selector:
matchLabels:
name: percona-server-mongodb-operator
template:
metadata:
labels:
name: percona-server-mongodb-operator
spec:
serviceAccountName: percona-server-mongodb-operator
containers:
- name: percona-server-mongodb-operator
image: perconalab/percona-server-mongodb-operator:main
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /metrics
port: metrics
scheme: HTTP
ports:
- containerPort: 8080
protocol: TCP
name: metrics
command:
- percona-server-mongodb-operator
env:
- name: LOG_STRUCTURED
value: 'false'
- name: LOG_LEVEL
value: INFO
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: percona-server-mongodb-operator
- name: RESYNC_PERIOD
value: 5s
- name: DISABLE_TELEMETRY
value: "false"
6 changes: 6 additions & 0 deletions config/marketplace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../operator

6 changes: 6 additions & 0 deletions config/operator/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../bundle

7 changes: 7 additions & 0 deletions config/rbac/cluster/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- service_account.yaml
- role.yaml
- role_binding.yaml
153 changes: 153 additions & 0 deletions config/rbac/cluster/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: percona-server-mongodb-operator
rules:
- apiGroups:
- psmdb.percona.com
resources:
- perconaservermongodbs
- perconaservermongodbs/status
- perconaservermongodbs/finalizers
- perconaservermongodbbackups
- perconaservermongodbbackups/status
- perconaservermongodbbackups/finalizers
- perconaservermongodbrestores
- perconaservermongodbrestores/status
- perconaservermongodbrestores/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods
- pods/exec
- services
- persistentvolumeclaims
- secrets
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- events.k8s.io
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- patch
- apiGroups:
- certmanager.k8s.io
- cert-manager.io
resources:
- issuers
- certificates
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- deletecollection
- apiGroups:
- net.gke.io
- multicluster.x-k8s.io
resources:
- serviceexports
- serviceimports
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- deletecollection
13 changes: 13 additions & 0 deletions config/rbac/cluster/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: service-account-percona-server-mongodb-operator
subjects:
- kind: ServiceAccount
name: percona-server-mongodb-operator
namespace: "psmdb-operator"
roleRef:
kind: ClusterRole
name: percona-server-mongodb-operator
apiGroup: rbac.authorization.k8s.io
5 changes: 5 additions & 0 deletions config/rbac/cluster/service_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: percona-server-mongodb-operator
7 changes: 7 additions & 0 deletions config/rbac/namespace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- service_account.yaml
- role.yaml
- role_binding.yaml
Loading
Loading