Created
June 26, 2020 21:50
-
-
Save venkatnsrinivasan/a23215c2ba31471893c2caa75873c851 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: types.kubefed.io/v1beta1 | |
kind: FederatedService | |
metadata: | |
name: cockroachdb-public | |
spec: | |
placement: | |
clusterSelector: | |
matchLabels: {} | |
template: | |
metadata: | |
labels: | |
app: cockroachdb | |
spec: | |
ports: | |
- name: grpc | |
port: 26257 | |
targetPort: 26257 | |
- name: http | |
port: 8080 | |
targetPort: 8080 | |
selector: | |
app: cockroachdb | |
--- | |
apiVersion: types.kubefed.io/v1beta1 | |
kind: FederatedService | |
metadata: | |
name: cockroachdb | |
spec: | |
placement: | |
clusterSelector: | |
matchLabels: {} | |
template: | |
metadata: | |
labels: | |
app: cockroachdb | |
spec: | |
ports: | |
- name: grpc | |
port: 26257 | |
targetPort: 26257 | |
- name: http | |
port: 8080 | |
targetPort: 8080 | |
publishNotReadyAddresses: true | |
selector: | |
app: cockroachdb | |
--- | |
apiVersion: types.kubefed.io/v1beta1 | |
kind: FederatedPodDisruptionBudget | |
metadata: | |
name: cockroachdb-budget | |
spec: | |
placement: | |
clusterSelector: | |
matchLabels: {} | |
template: | |
metadata: | |
labels: | |
app: cockroachdb | |
spec: | |
maxUnavailable: 1 | |
selector: | |
matchLabels: | |
app: cockroachdb | |
--- | |
apiVersion: types.kubefed.io/v1beta1 | |
kind: FederatedStatefulSet | |
metadata: | |
name: cockroachdb | |
spec: | |
placement: | |
clusterSelector: | |
matchLabels: {} | |
template: | |
spec: | |
podManagementPolicy: Parallel | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: cockroachdb | |
serviceName: cockroachdb | |
template: | |
metadata: | |
labels: | |
app: cockroachdb | |
spec: | |
affinity: | |
podAntiAffinity: | |
preferredDuringSchedulingIgnoredDuringExecution: | |
- podAffinityTerm: | |
labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- cockroachdb | |
topologyKey: kubernetes.io/hostname | |
weight: 100 | |
containers: | |
- command: | |
- /bin/bash | |
- -ecx | |
- exec /cockroach/cockroach start --logtostderr --insecure --advertise-host | |
$(hostname -f) --http-addr 0.0.0.0 --join cockroachdb-0.cockroachdb,cockroachdb-1.cockroachdb,cockroachdb-2.cockroachdb | |
--cache 25% --max-sql-memory 25% | |
env: | |
- name: COCKROACH_CHANNEL | |
value: kubernetes-insecure | |
image: cockroachdb/cockroach:v20.1.1 | |
imagePullPolicy: IfNotPresent | |
livenessProbe: | |
httpGet: | |
path: /health | |
port: http | |
initialDelaySeconds: 30 | |
periodSeconds: 5 | |
name: cockroachdb | |
ports: | |
- containerPort: 26257 | |
name: grpc | |
- containerPort: 8080 | |
name: http | |
readinessProbe: | |
failureThreshold: 2 | |
httpGet: | |
path: /health?ready=1 | |
port: http | |
initialDelaySeconds: 10 | |
periodSeconds: 5 | |
volumeMounts: | |
- mountPath: /cockroach/cockroach-data | |
name: datadir | |
terminationGracePeriodSeconds: 60 | |
volumes: | |
- name: datadir | |
persistentVolumeClaim: | |
claimName: datadir | |
updateStrategy: | |
type: RollingUpdate | |
volumeClaimTemplates: | |
- metadata: | |
name: datadir | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 30Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment