Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- kind: Service
- metadata:
- labels:
- app: cassandra
- namespace: cassandra-e2e
- name: cassandra
- spec:
- clusterIP: None
- ports:
- - name: tcp-client
- port: 9042
- - name: tcp-intra-node
- port: 7000
- - name: tcp-tls-intra-node
- port: 7001
- - name: tcp-jmx
- port: 7199
- selector:
- app: cassandra
- ---
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- namespace: cassandra-e2e
- name: cassandra
- labels:
- app: cassandra
- spec:
- serviceName: cassandra
- replicas: 1
- selector:
- matchLabels:
- app: cassandra
- template:
- metadata:
- labels:
- app: cassandra
- spec:
- terminationGracePeriodSeconds: 1800
- containers:
- - name: pod-ip-access
- securityContext:
- runAsUser: 0
- capabilities:
- add:
- - NET_ADMIN
- env:
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- - name: IPTABLE_CMD
- value: iptables -t nat -I ISTIO_OUTPUT -d $(POD_IP) -j RETURN
- # image: cscetbon/alpine-dumb-init-iptables
- image: istio/proxyv2:1.1.7
- command:
- # - /usr/bin/dumb-init
- - /bin/sh
- - -c
- - trap 'exit 0' SIGKILL SIGALRM SIGTERM; $(echo ${IPTABLE_CMD}|sed -e 's/I /C /') && exec sleep 1000d || $(${IPTABLE_CMD})
- - name: cassandra
- image: cscetbon/cassandra-image:3.11.4-8u212-0.3.1
- command:
- - /sbin/dumb-init
- - /bin/bash
- - -c
- - sed -e 's/^\(CASSANDRA_LISTEN_ADDRESS\)=.*/\1=127.0.0.1/' /run.sh|sponge /run.sh /etc/cassandra/cassandra-env.sh && /run.sh
- imagePullPolicy: Always
- ports:
- - containerPort: 7000
- name: intra-node
- - containerPort: 7001
- name: tls-intra-node
- - containerPort: 7199
- name: jmx
- - containerPort: 9042
- resources:
- limits:
- cpu: "1"
- memory: 768Mi
- requests:
- cpu: "1"
- memory: 768Mi
- securityContext:
- capabilities:
- add:
- - IPC_LOCK
- livenessProbe:
- exec:
- command:
- - /bin/bash
- - -c
- - nodetool status
- failureThreshold: 3
- initialDelaySeconds: 120
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 20
- readinessProbe:
- exec:
- command:
- - /bin/bash
- - -c
- - /ready-probe.sh
- failureThreshold: 3
- initialDelaySeconds: 60
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 10
- env:
- - name: MAX_HEAP_SIZE
- value: 192M
- - name: CASSANDRA_SEEDS
- value: cassandra-0.cassandra.cassandra-e2e.svc.cluster.local
- - name: CASSANDRA_CLUSTER_NAME
- value: K8Demo
- - name: CASSANDRA_DC
- value: DC1-K8Demo
- - name: CASSANDRA_RACK
- value: Rack1-K8Demo
- - name: POD_NAME
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.name
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement