diff --git a/operators/nutanix-database-service-operator/0.0.4/bundle.Dockerfile b/operators/nutanix-database-service-operator/0.0.4/bundle.Dockerfile new file mode 100644 index 00000000000..bed37cd3d9b --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/bundle.Dockerfile @@ -0,0 +1,20 @@ +FROM scratch + +# Core bundle labels. +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=nutanix-database-service-operator +LABEL operators.operatorframework.io.bundle.channels.v1=alpha +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.1 +LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 +LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 + +# Labels for testing. +LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 +LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ + +# Copy files to locations specified by labels. +COPY bundle/manifests /manifests/ +COPY bundle/metadata /metadata/ +COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-controller-manager-metrics-service_v1_service.yaml b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-controller-manager-metrics-service_v1_service.yaml new file mode 100644 index 00000000000..0c01c4213b6 --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-controller-manager-metrics-service_v1_service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + control-plane: controller-manager + name: ndb-operator-controller-manager-metrics-service +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + selector: + control-plane: controller-manager +status: + loadBalancer: {} diff --git a/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-manager-config_v1_configmap.yaml b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-manager-config_v1_configmap.yaml new file mode 100644 index 00000000000..7c5cafe7684 --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-manager-config_v1_configmap.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +data: + controller_manager_config.yaml: "apiVersion: controller-runtime.sigs.k8s.io/v1alpha1\nkind: + ControllerManagerConfig\nhealth:\n healthProbeBindAddress: :8081\nmetrics:\n + \ bindAddress: 127.0.0.1:8080\nwebhook:\n port: 9443\nleaderElection:\n leaderElect: + true\n resourceName: 81efaee7.nutanix.com\n# leaderElectionReleaseOnCancel + defines if the leader should step down volume \n# when the Manager ends. This + requires the binary to immediately end when the\n# Manager is stopped, otherwise, + this setting is unsafe. Setting this significantly\n# speeds up voluntary leader + transitions as the new leader don't have to wait\n# LeaseDuration time first.\n# + \ In the default scaffold provided, the program ends immediately after \n# the + manager stops, so would be fine to enable this option. However, \n# if you are + doing or is intended to do any operation such as perform cleanups \n# after + the manager stops then its usage might be unsafe.\n# leaderElectionReleaseOnCancel: + true\n" +kind: ConfigMap +metadata: + name: ndb-operator-manager-config diff --git a/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml new file mode 100644 index 00000000000..e36480499aa --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: ndb-operator-metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get diff --git a/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator.clusterserviceversion.yaml b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator.clusterserviceversion.yaml new file mode 100644 index 00000000000..7b3e00b76f0 --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb-operator.clusterserviceversion.yaml @@ -0,0 +1,266 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "ndb.nutanix.com/v1alpha1", + "kind": "Database", + "metadata": { + "name": "db" + }, + "spec": { + "databaseInstance": { + "credentialSecret": "db-instance-secret-name", + "databaseInstanceName": "Database Instance Name", + "databaseNames": [ + "database_one", + "database_two", + "database_three" + ], + "size": 10, + "timezone": "UTC", + "type": "postgres" + }, + "ndb": { + "clusterId": "Nutanix Cluster Id", + "credentialSecret": "ndb-secret-name", + "server": "https://[NDB IP]:8443/era/v0.9", + "skipCertificateVerification": true + } + } + } + ] + capabilities: Basic Install + createdAt: "2023-05-22T22:18:11Z" + operators.operatorframework.io/builder: operator-sdk-v1.28.1 + operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 + name: ndb-operator.v0.0.4 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Database is the Schema for the databases API + displayName: Database + kind: Database + name: databases.ndb.nutanix.com + version: v1alpha1 + description: The NDB kubernetes operator enables developers to provision and delete + single instance PostgreSQL databases, Single instance MongoDB and Single instance + MySQL databases from their Kuberenetes cluster and connect these instances to + their applications with ease. Developers can also restore and clone their databases + using the NDB operator. + displayName: Nutanix Database Service Operator + icon: + - base64data: "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjYg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IwOTMwMjMzLDEyLjYzNjMwOTUgQzIuMjA5MzAyMzMsNi45MjU0NzYxOSAxMC4xNTA5MzAyLDIuMjk1OTUyMzggMTkuOTQ3NTU4MSwyLjI5NTk1MjM4IEMyOS43NDQwNjk4LDIuMjk1OTUyMzggMzcuNjg1Njk3Nyw2LjkyNTQ3NjE5IDM3LjY4NTY5NzcsMTIuNjM2MzA5NSBDMzcuNjg1Njk3NywxOC4zNDcwMjM4IDI5Ljc0NDA2OTgsMjIuOTc2NjY2NyAxOS45NDc1NTgxLDIyLjk3NjY2NjcgQzE1LjExMDIzMjYsMjIuOTc2NjY2NyAxMC43MjYwNDY1LDIxLjg0NzM4MSA3LjUyNjA0NjUxLDIwLjAxNzAyMzggQzYuNzgxNTExNjMsMjAuNDQyODU3MSA2LjEwMDU4MTQsMjAuOTA2MTkwNSA1LjQ5MzYwNDY1LDIxLjQwMjUgQzkuMTAwOTMwMjMsMjMuNzc4OTI4NiAxNC4yMDQ1MzQ5LDI1LjIzODU3MTQgMTkuOTQ3NTU4MSwyNS4yMzg1NzE0IEMzMS4xMzMwMjMzLDI1LjIzODU3MTQgMzkuODk1LDE5LjcwMjk3NjIgMzkuODk1LDEyLjYzNjMwOTUgQzM5Ljg5NSw1LjU2OTY0Mjg2IDMxLjEzMzAyMzMsMC4wMzQwNDc2MTkgMTkuOTQ3NTU4MSwwLjAzNDA0NzYxOSIgaWQ9IkZpbGwtMyIgZmlsbD0iIzE5NDY4OCIgbWFzaz0idXJsKCNtYXNrLTIpIj48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==" + mediatype: "image/svg+xml" + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - ndb.nutanix.com + resources: + - databases + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - ndb.nutanix.com + resources: + - databases/finalizers + verbs: + - update + - apiGroups: + - ndb.nutanix.com + resources: + - databases/status + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - services + - endpoints + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + serviceAccountName: ndb-operator-controller-manager + deployments: + - label: + control-plane: controller-manager + name: ndb-operator-controller-manager + spec: + replicas: 1 + selector: + matchLabels: + control-plane: controller-manager + strategy: {} + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + image: docker.io/manavrajvanshinx/ndb-operator:v0.0.4 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + securityContext: + runAsNonRoot: true + serviceAccountName: ndb-operator-controller-manager + terminationGracePeriodSeconds: 10 + permissions: + - 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 + serviceAccountName: ndb-operator-controller-manager + strategy: deployment + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - Nutanix + - NDB + - Database + - DBaaS + - PostgreSQL + - MySQL + - MongoDB + links: + - name: NDB Operator + url: https://github.com/nutanix-cloud-native/ndb-operator + maintainers: + - email: manav.rajvanshi@nutanix.com + name: Manav Rajvanshi + - email: krunal.jhaveri@nutanix.com + name: Krunal Jhaveri + - email: pritika.shenoy@nutanix.com + name: Pritika Shenoy + - email: akshay.mishra@nutanix.com + name: Akshay Mishra + - email: yashesh.mankad@nutanix.com + name: Yashesh Mankad + maturity: alpha + provider: + name: Nutanix, Inc. + url: https://www.nutanix.com/ + version: 0.0.4 + minKubeVersion: 1.16.0 diff --git a/operators/nutanix-database-service-operator/0.0.4/manifests/ndb.nutanix.com_databases.yaml b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb.nutanix.com_databases.yaml new file mode 100644 index 00000000000..e3e86acfd3a --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/manifests/ndb.nutanix.com_databases.yaml @@ -0,0 +1,178 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: databases.ndb.nutanix.com +spec: + group: ndb.nutanix.com + names: + kind: Database + listKind: DatabaseList + plural: databases + shortNames: + - db + - dbs + singular: database + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ipAddress + name: IP Address + type: string + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.id + name: Database Instance ID + type: string + - jsonPath: .status.dbServerId + name: Database Server ID + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Database is the Schema for the databases 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: DatabaseSpec defines the desired state of Database + properties: + databaseInstance: + description: Database instance specific details + properties: + credentialSecret: + description: Name of the secret holding the credentials for the + database instance (password and ssh key) + type: string + databaseInstanceName: + default: database_instance_name + description: Name of the database instance + type: string + databaseNames: + default: + - database_one + - database_two + - database_three + description: Name of the database to be provisiond in the database + instance + items: + type: string + minItems: 1 + type: array + profiles: + properties: + compute: + properties: + id: + type: string + versionId: + type: string + type: object + dbParam: + properties: + id: + type: string + versionId: + type: string + type: object + network: + properties: + id: + type: string + versionId: + type: string + type: object + software: + properties: + id: + type: string + versionId: + type: string + type: object + type: object + size: + default: 10 + description: Size of the database instance + minimum: 10 + type: integer + timezone: + default: UTC + type: string + type: + default: postgres + enum: + - mysql + - postgres + - mongodb + type: string + required: + - credentialSecret + - databaseInstanceName + - databaseNames + - type + type: object + ndb: + description: Details of the NDB installation + properties: + clusterId: + type: string + credentialSecret: + description: Name of the secret holding the credentials for NDB + (username and password) + type: string + server: + type: string + skipCertificateVerification: + default: false + description: Skip server's certificate and hostname verification + type: boolean + required: + - clusterId + - credentialSecret + - server + type: object + required: + - databaseInstance + - ndb + type: object + status: + description: DatabaseStatus defines the observed state of Database + properties: + dbServerId: + type: string + id: + type: string + ipAddress: + type: string + status: + type: string + required: + - dbServerId + - id + - ipAddress + - status + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: null + storedVersions: null diff --git a/operators/nutanix-database-service-operator/0.0.4/metadata/annotations.yaml b/operators/nutanix-database-service-operator/0.0.4/metadata/annotations.yaml new file mode 100644 index 00000000000..751b5f1cc57 --- /dev/null +++ b/operators/nutanix-database-service-operator/0.0.4/metadata/annotations.yaml @@ -0,0 +1,14 @@ +annotations: + # Core bundle annotations. + operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.manifests.v1: manifests/ + operators.operatorframework.io.bundle.metadata.v1: metadata/ + operators.operatorframework.io.bundle.package.v1: nutanix-database-service-operator + operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.1 + operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 + operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 + + # Annotations for testing. + operators.operatorframework.io.test.mediatype.v1: scorecard+v1 + operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/operators/nutanix-database-service-operator/ci.yaml b/operators/nutanix-database-service-operator/ci.yaml new file mode 100644 index 00000000000..2ef354ba88c --- /dev/null +++ b/operators/nutanix-database-service-operator/ci.yaml @@ -0,0 +1,5 @@ +--- +# Use `replaces-mode` or `semver-mode`. Once you switch to `semver-mode`, there is no easy way back. +updateGraph: replaces-mode +reviewers: + - manavrajvanshi