# dbCove on Kubernetes, with its repository on your own Oracle (12.2 or later). Your DBA prepares a user with CREATE # SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE TRIGGER and a quota on its default tablespace; dbCove makes its tables # in that schema. When a privilege is missing, kubectl logs dbcove-0 shows the exact grant script. # Rendered from build/helm/dbcove by build/kubernetes/render.sh; change the chart, not this file. With Helm, install the # chart instead (helm install dbcove https://dbcove.com/helm/dbcove-0.1.0.tgz --set ...): it takes the same values in one command. # Installing dbCove accepts its license agreement (/opt/dbcove/EULA.txt in the image). # # 1. Create the Secret with the repository's password, in the namespace you install dbCove in (one line in the file): # kubectl create secret generic dbcove-repository --from-file=password=./repository_password.txt # 2. Set the repository's host, port, service name and user below (DBCOVE_REPOSITORY_...). # 3. Set TZ to your time zone, and the volume's size or storage class if you want others. # 4. kubectl apply -f this file. The first password of admin is in `kubectl logs dbcove-0`, once, between two lines # of '='. Then: kubectl port-forward service/dbcove 8443:443 and open https://localhost:8443/ # # OpenShift: remove the line fsGroup: 1654 below (OpenShift sets the pod's user and fsGroup itself). # Access from outside the cluster: # - Straight to dbCove's own HTTPS: set the Service's type to LoadBalancer (or NodePort) and open https://
/. # - TLS ended at your ingress controller: dbCove needs Server__HttpBind=Any and a Service port 80 to the pod's 5137, and # the proxy must pass WebSocket connections. Render that with the chart: helm template dbcove https://dbcove.com/helm/dbcove-0.1.0.tgz --set # ingress.enabled=true --set ingress.tls=edge --set ingress.host=dbcove.example.com --set ... (the values of step 2). --- # Source: dbcove/templates/service.yaml apiVersion: v1 kind: Service metadata: name: dbcove labels: app.kubernetes.io/name: dbcove app.kubernetes.io/instance: dbcove spec: # ClusterIP: reached through an Ingress (or Route) or kubectl port-forward. LoadBalancer or NodePort: users open # https:/// straight to dbCove's own HTTPS. type: ClusterIP selector: app.kubernetes.io/name: dbcove app.kubernetes.io/instance: dbcove ports: - name: https port: 443 targetPort: https --- # Source: dbcove/templates/statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: dbcove labels: app.kubernetes.io/name: dbcove app.kubernetes.io/instance: dbcove spec: # One copy only: dbCove keeps rows per server named after its host name, and two copies on one repository are not # supported. The StatefulSet keeps the pod's name (dbcove-0), so its host name, across restarts. replicas: 1 serviceName: dbcove selector: matchLabels: app.kubernetes.io/name: dbcove app.kubernetes.io/instance: dbcove template: metadata: labels: app.kubernetes.io/name: dbcove app.kubernetes.io/instance: dbcove spec: # Passes the "restricted" Pod Security Standard. securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault # The volume's group is set once, on the first start: later starts leave dbCove's files (and protection.key's # mode 600) as they are. fsGroupChangePolicy: OnRootMismatch # Makes the data volume writable by the image's user (1654) on every kind of storage. OpenShift: remove this # line; OpenShift sets the pod's user id and fsGroup itself and refuses fixed ones outside the project's range. fsGroup: 1654 # The API stops its collectors and writes its last log rows before it ends. terminationGracePeriodSeconds: 60 containers: - name: dbcove image: "dbcove/dbcove:3.2.11" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] # dbCove writes only to its data volume and /tmp. readOnlyRootFilesystem: true env: - name: DBCOVE_ACCEPT_EULA value: "Y" - name: TZ value: "Etc/UTC" - name: DBCOVE_REPOSITORY_ENGINE value: oracle - name: DBCOVE_REPOSITORY_HOST value: "oracle.example.com" - name: DBCOVE_REPOSITORY_PORT value: "1521" - name: DBCOVE_REPOSITORY_SERVICE_NAME value: "dbcove" - name: DBCOVE_REPOSITORY_USER value: "DBCOVE" # The password is read from the Secret's file, never from an environment variable. - name: DBCOVE_REPOSITORY_PASSWORD_FILE value: /run/secrets/dbcove/repository_password ports: - name: https containerPort: 5138 # The image's own health check: the API (after its repository upgrade) and the web interface both answer. # Up to 30 minutes for the first start or an upgrade of the repository (180 x 10 seconds), then every 30 # seconds (alive) and 10 seconds (ready). startupProbe: exec: command: ["/usr/local/bin/healthcheck"] periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 180 livenessProbe: exec: command: ["/usr/local/bin/healthcheck"] periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 3 readinessProbe: exec: command: ["/usr/local/bin/healthcheck"] periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 3 # Without a limit .NET sees the whole node and keeps what it takes. 2Gi is for a small installation: raise it # with databases. The API's heap takes at most 55% of the limit and the web interface's 20%: they share the pod. resources: limits: memory: 2Gi requests: cpu: "1" memory: 2Gi volumeMounts: - name: data mountPath: /var/lib/dbcove - name: tmp mountPath: /tmp - name: secrets mountPath: /run/secrets/dbcove readOnly: true volumes: # The root file system is read-only: /tmp (also dbCove's HOME) is an empty folder of the pod. - name: tmp emptyDir: {} - name: secrets projected: sources: - secret: name: dbcove-repository items: - key: password path: repository_password volumeClaimTemplates: - metadata: name: data spec: accessModes: ["ReadWriteOnce"] resources: requests: # Keys, settings, certificates and log files: a few MB, with room for the logs. The monitoring data is in # the repository. storage: 2Gi