mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #80421 from lostick/fix-es-master-discovery
Fix es initial cluster formation & update es to 7.2.0
This commit is contained in:
commit
10005d2e1e
@ -17,7 +17,7 @@ COPY elasticsearch_logging_discovery.go go.mod go.sum /
|
|||||||
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -ldflags "-w" -o /elasticsearch_logging_discovery /elasticsearch_logging_discovery.go
|
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -ldflags "-w" -o /elasticsearch_logging_discovery /elasticsearch_logging_discovery.go
|
||||||
|
|
||||||
|
|
||||||
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:7.1.1
|
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:7.2.0
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
PREFIX = quay.io/fluentd_elasticsearch
|
PREFIX = quay.io/fluentd_elasticsearch
|
||||||
IMAGE = elasticsearch
|
IMAGE = elasticsearch
|
||||||
TAG = v7.1.1
|
TAG = v7.2.0
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build --tag ${PREFIX}/${IMAGE}:${TAG} .
|
docker build --tag ${PREFIX}/${IMAGE}:${TAG} .
|
||||||
|
docker build --tag ${PREFIX}/${IMAGE}:latest .
|
||||||
|
|
||||||
push:
|
push:
|
||||||
docker push ${PREFIX}/${IMAGE}:${TAG}
|
docker push ${PREFIX}/${IMAGE}:${TAG}
|
||||||
docker push ${PREFIX}/${IMAGE}:latest
|
docker push ${PREFIX}/${IMAGE}:latest
|
||||||
|
@ -4,11 +4,9 @@ node.name: ${NODE_NAME}
|
|||||||
node.master: ${NODE_MASTER}
|
node.master: ${NODE_MASTER}
|
||||||
node.data: ${NODE_DATA}
|
node.data: ${NODE_DATA}
|
||||||
|
|
||||||
transport.tcp.port: ${TRANSPORT_PORT}
|
transport.profiles.default.port: ${TRANSPORT_PORT}
|
||||||
http.port: ${HTTP_PORT}
|
http.port: ${HTTP_PORT}
|
||||||
|
|
||||||
path.data: /data
|
path.data: /data
|
||||||
|
|
||||||
network.host: 0.0.0.0
|
network.host: 0.0.0.0
|
||||||
|
|
||||||
discovery.zen.minimum_master_nodes: ${MINIMUM_MASTER_NODES}
|
|
||||||
|
@ -124,5 +124,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
klog.Infof("Endpoints = %s", addrs)
|
klog.Infof("Endpoints = %s", addrs)
|
||||||
fmt.Printf("discovery.zen.ping.unicast.hosts: [%s]\n", strings.Join(addrs, ", "))
|
fmt.Printf("discovery.seed_hosts: [%s]\n", strings.Join(addrs, ", "))
|
||||||
|
fmt.Printf("cluster.initial_master_nodes: [%s]\n", strings.Join(addrs, ", "))
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ require (
|
|||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
gopkg.in/yaml.v2 v2.2.2 // indirect
|
gopkg.in/yaml.v2 v2.2.2 // indirect
|
||||||
k8s.io/api v0.0.0-20190111032252-67edc246be36 // indirect
|
k8s.io/api v0.0.0-20190111032252-67edc246be36
|
||||||
k8s.io/apiextensions-apiserver v0.0.0-20190111034747-7d26de67f177 // indirect
|
k8s.io/apiextensions-apiserver v0.0.0-20190111034747-7d26de67f177 // indirect
|
||||||
k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
|
k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
|
||||||
k8s.io/apiserver v0.0.0-20190111033246-d50e9ac5404f // indirect
|
k8s.io/apiserver v0.0.0-20190111033246-d50e9ac5404f // indirect
|
||||||
|
@ -51,7 +51,7 @@ metadata:
|
|||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
k8s-app: elasticsearch-logging
|
k8s-app: elasticsearch-logging
|
||||||
version: v7.1.1
|
version: v7.2.0
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
spec:
|
spec:
|
||||||
serviceName: elasticsearch-logging
|
serviceName: elasticsearch-logging
|
||||||
@ -59,17 +59,18 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
k8s-app: elasticsearch-logging
|
k8s-app: elasticsearch-logging
|
||||||
version: v7.1.1
|
version: v7.2.0
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: elasticsearch-logging
|
k8s-app: elasticsearch-logging
|
||||||
version: v7.1.1
|
version: v7.2.0
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: elasticsearch-logging
|
serviceAccountName: elasticsearch-logging
|
||||||
containers:
|
containers:
|
||||||
- image: quay.io/fluentd_elasticsearch/elasticsearch:v7.1.1
|
- image: quay.io/fluentd_elasticsearch/elasticsearch:v7.2.0
|
||||||
name: elasticsearch-logging
|
name: elasticsearch-logging
|
||||||
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
# need more cpu upon initialization, therefore burstable class
|
# need more cpu upon initialization, therefore burstable class
|
||||||
limits:
|
limits:
|
||||||
|
@ -20,7 +20,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: kibana-logging
|
- name: kibana-logging
|
||||||
image: docker.elastic.co/kibana/kibana-oss:7.1.1
|
image: docker.elastic.co/kibana/kibana-oss:7.2.0
|
||||||
resources:
|
resources:
|
||||||
# need more cpu upon initialization, therefore burstable class
|
# need more cpu upon initialization, therefore burstable class
|
||||||
limits:
|
limits:
|
||||||
@ -28,10 +28,14 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
env:
|
env:
|
||||||
- name: ELASTICSEARCH_URL
|
- name: ELASTICSEARCH_HOSTS
|
||||||
value: http://elasticsearch-logging:9200
|
value: http://elasticsearch-logging:9200
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: kibana-logging
|
||||||
- name: SERVER_BASEPATH
|
- name: SERVER_BASEPATH
|
||||||
value: /api/v1/namespaces/kube-system/services/kibana-logging/proxy
|
value: /api/v1/namespaces/kube-system/services/kibana-logging/proxy
|
||||||
|
- name: SERVER_REWRITEBASEPATH
|
||||||
|
value: "false"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5601
|
- containerPort: 5601
|
||||||
name: ui
|
name: ui
|
||||||
|
Loading…
Reference in New Issue
Block a user