sdb-operator.yaml

This generates the Operator Deployment object that will spawn and maintain the Operator.

Create a deployment definition file using the template below.

The --cluster-id argument must match the name of the SingleStore custom resource as defined in the sdb-cluster.yaml ("sdb-cluster" by default). This value can be edited as long as these values match, so that the Operator knows which custom resource to manage.

apiVersion: apps/v1
kind: Deployment
metadata:
name: sdb-operator
labels:
app.kubernetes.io/component: operator
spec:
replicas: 1
selector:
matchLabels:
name: sdb-operator
template:
metadata:
labels:
name: sdb-operator
spec:
serviceAccountName: sdb-operator
containers:
- name: sdb-operator
image: operator_image_tag
imagePullPolicy: Always
args: [
# Cause the operator to merge rather than replace annotations on services
"--merge-service-annotations",
# Allow the process inside the container to have read/write access to the `/var/lib/memsql` volume.
"--fs-group-id", "5555",
"--cluster-id", "sdb-cluster" ]
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "sdb-operator"

You must edit this file and replace operator_image_tag with the either the local singlestore/operator Docker image you pulled down (such as "sdb-operator"), or add in an imagePullSecrets section under the spec section and reference a Kubernetes Secret that you can create via kubectl apply.

Refer to the Kubernetes documentation for more information on imagePullPolicy and creating Secrets.

Last modified: July 20, 2023

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK