apiVersion: apps/v1 kind: StatefulSet metadata: name: fiesta namespace: nearle labels: app: fiesta spec: serviceName: "fiesta" replicas: 3 selector: matchLabels: app: fiesta template: metadata: labels: app: fiesta spec: tolerations: - key: dedicated operator: Equal value: apps effect: NoSchedule affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.workolik/app operator: In values: - "true" podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchLabels: app: fiesta topologyKey: kubernetes.io/hostname topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app: fiesta containers: - name: backend image: nearlecommerce/fiesta:v1.3.90 imagePullPolicy: Always securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL ports: - containerPort: 1122 envFrom: - configMapRef: name: nearle-config - secretRef: name: app-secrets env: - name: PORT value: "1122" - name: NATS_USER valueFrom: secretKeyRef: name: nats-credentials key: username - name: NATS_PASSWORD valueFrom: secretKeyRef: name: nats-credentials key: password --- apiVersion: v1 kind: Service metadata: name: fiesta namespace: nearle labels: app: fiesta spec: type: NodePort ports: - port: 80 targetPort: 1122 nodePort: 30823 protocol: TCP name: main selector: app: fiesta