---
# Source: node-scanner-batch/templates/rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: node-scanner-sa
---
# Source: node-scanner-batch/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: node-scanner-batch-config
data:
  scanSchedule: "schedule_placeholder"
  httpEndpoint: "https://operator-registry.cubbit.eu/v1/internal/clusters/%s/nodes"
  organizationID: "organizationID_placeholder"
---
# Source: node-scanner-batch/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: node-scanner-cluster-role
rules:
- apiGroups: [""]
  resources: ["namespaces"]
  verbs: ["list"]
- apiGroups: [""]
  resources: ["namespaces"]
  resourceNames: ["kube-system"]
  verbs: ["get"]
---
# Source: node-scanner-batch/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: node-scanner-cluster-role-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: node-scanner-cluster-role
subjects:
- kind: ServiceAccount
  name: node-scanner-sa
  namespace: namespace_placeholder
---
# Source: node-scanner-batch/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: node-scanner-role
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["configmaps"]
  verbs: ["get", "list", "create", "update", "patch"]
---
# Source: node-scanner-batch/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: node-scanner-role-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: node-scanner-role
subjects:
- kind: ServiceAccount
  name: node-scanner-sa
  namespace: namespace_placeholder
---
# Source: node-scanner-batch/templates/cronjob.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
  name: node-scanner-batch
  labels:
    app: node-scanner-batch
spec:
  schedule: "schedule_placeholder"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          imagePullSecrets:
            - name: regcred
          serviceAccountName: node-scanner-sa
          containers:
          - name: scanner-batch
            image: cubbit/node-scanner-batch:latest
            imagePullPolicy: Always
            env:
            - name: DISABLE_HTTP
              value: "false"
            - name: LOG_LEVEL
              value: "info"
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: HTTP_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: secret_name_placeholder
                  key: "apiKey"
            envFrom:
            - configMapRef:
                name: node-scanner-batch-config
          restartPolicy: OnFailure
---
