SingleStore DB

deployment.yaml

Create a deployment definition file using the template below.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: memsql-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: memsql-operator
  template:
    metadata:
      labels:
        name: memsql-operator
    spec:
      serviceAccountName: memsql-operator
      containers:
        - name: memsql-operator
          image: "OPERATOR_IMAGE"
          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"
          ]
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "memsql-operator"

You must edit this file and replace OPERATOR_IMAGE with the either the local memsql/operator Docker image you pulled down (such as "memsql-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.