apiVersion: apps/v1
kind: Deployment
metadata:
  name: palantir-operator
  labels:
    app.kubernetes.io/name: "palantir-operator"
    app.kubernetes.io/managed-by: "palantir.com"
    app.kubernetes.io/instance: "palantir-operator"
    com.palantir.sls.status/sls-status: ""
  annotations:
    com.palantir.sls.status/metadata: >
      {
        "entityId": "palantir-operator",
        "entityName": "palantir-operator",
        "productName": "palantir-operator",
        "productVersion": "1.24.0",
        "productGroup": "com.palantir.deployability",
        "stackName": "palantir-operator",
        "stackId": "palantir-operator"
      }
    com.palantir.sls.status/probe: >
      {
        "containerProbes": {
          "palantir-operator": {
            "path": "/palantir-operator",
            "port":"3756"
          }
        }
      }
spec:
  replicas: 1
  selector:
    matchLabels:
      rubix-app: palantir-operator
  template:
    metadata:
      annotations:
        com.palantir.deployability/status-sidecar-insecure-skip-verify: ""
        com.palantir.rubix.pod/sls-service-info-v2: >
          {
            "service-name": "palantir-operator",
            "service-id": "palantir-operator",
            "stack-name": "palantir",
            "stack-id":"palantir",
            "containers": {
              "palantir-operator": {
                "product-name": "palantir-operator",
                "product-version": "1.24.0"
              }
            }
          }
      labels:
        app.kubernetes.io/name: "palantir-operator"
        app.kubernetes.io/managed-by: "palantir.com"
        app.kubernetes.io/instance: "palantir-operator"
        rubix-app: palantir-operator
    spec:
      volumes:
        - name: config-volume
          configMap:
            name: palantir-operator
            items:
              - key: install.yml
                path: install.yml
              - key: runtime.yml
                path: runtime.yml
      serviceAccountName: palantir-operator
      securityContext:
        runAsNonRoot: true
      containers:
        - name: palantir-operator
          image: "docker.external.palantir.build/deployability/palantir-operator:1.24.0"
          imagePullPolicy: Always
          env:
            - name: OPERATOR_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 100m
              memory: 128Mi
          volumeMounts:
            - name: config-volume
              mountPath: "/opt/palantir/services/palantir-operator/var/conf"
