v1.18 support changes

This commit is contained in:
Pat Christopher 2020-10-03 22:54:17 -05:00
parent 90c9f7b3e1
commit 60272a7730
No known key found for this signature in database
GPG Key ID: 298285BC16255C5B
2 changed files with 69 additions and 58 deletions

View File

@ -9,9 +9,18 @@ metadata:
addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "Elasticsearch" kubernetes.io/name: "Elasticsearch"
spec: spec:
clusterIP: None
ports: ports:
- port: 9200 - name: db
protocol: TCP port: 9200
targetPort: db protocol: TCP
targetPort: 9200
- name: transport
port: 9300
protocol: TCP
targetPort: 9300
publishNotReadyAddresses: true
selector: selector:
k8s-app: elasticsearch-logging k8s-app: elasticsearch-logging
sessionAffinity: None
type: ClusterIP

View File

@ -16,14 +16,14 @@ metadata:
k8s-app: elasticsearch-logging k8s-app: elasticsearch-logging
addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: Reconcile
rules: rules:
- apiGroups: - apiGroups:
- "" - ""
resources: - resources:
- "services" - "services"
- "namespaces" - "namespaces"
- "endpoints" - "endpoints"
verbs: - verbs:
- "get" - "get"
--- ---
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -34,10 +34,10 @@ metadata:
k8s-app: elasticsearch-logging k8s-app: elasticsearch-logging
addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: Reconcile
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: elasticsearch-logging name: elasticsearch-logging
namespace: kube-system namespace: kube-system
apiGroup: "" apiGroup: ""
roleRef: roleRef:
kind: ClusterRole kind: ClusterRole
name: elasticsearch-logging name: elasticsearch-logging
@ -68,51 +68,53 @@ spec:
spec: spec:
serviceAccountName: elasticsearch-logging serviceAccountName: elasticsearch-logging
containers: containers:
- image: quay.io/fluentd_elasticsearch/elasticsearch:v7.4.2 - image: quay.io/fluentd_elasticsearch/elasticsearch:v7.4.2
name: elasticsearch-logging name: elasticsearch-logging
imagePullPolicy: Always imagePullPolicy: Always
resources: resources:
# need more cpu upon initialization, therefore burstable class # need more cpu upon initialization, therefore burstable class
limits: limits:
cpu: 1000m cpu: 1000m
memory: 3Gi memory: 3Gi
requests: requests:
cpu: 100m cpu: 100m
memory: 3Gi memory: 3Gi
ports: ports:
- containerPort: 9200 - containerPort: 9200
name: db name: db
protocol: TCP protocol: TCP
- containerPort: 9300 - containerPort: 9300
name: transport name: transport
protocol: TCP protocol: TCP
livenessProbe: livenessProbe:
tcpSocket: tcpSocket:
port: transport port: transport
initialDelaySeconds: 5 initialDelaySeconds: 5
timeoutSeconds: 10 timeoutSeconds: 10
readinessProbe: readinessProbe:
tcpSocket: tcpSocket:
port: transport port: transport
initialDelaySeconds: 5 initialDelaySeconds: 5
timeoutSeconds: 10 timeoutSeconds: 10
volumeMounts: volumeMounts:
- name: elasticsearch-logging - name: elasticsearch-logging
mountPath: /data mountPath: /data
env: env:
- name: "NAMESPACE" - name: "NAMESPACE"
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
- name: "MINIMUM_MASTER_NODES"
value: "1"
volumes: volumes:
- name: elasticsearch-logging - name: elasticsearch-logging
emptyDir: {} emptyDir: {}
# Elasticsearch requires vm.max_map_count to be at least 262144. # Elasticsearch requires vm.max_map_count to be at least 262144.
# If your OS already sets up this number to a higher value, feel free # If your OS already sets up this number to a higher value, feel free
# to remove this init container. # to remove this init container.
initContainers: initContainers:
- image: alpine:3.6 - image: alpine:3.6
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"] command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
name: elasticsearch-logging-init name: elasticsearch-logging-init
securityContext: securityContext:
privileged: true privileged: true