mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
fix elasticsearch
This commit is contained in:
parent
d19490d572
commit
40eb1599dd
@ -20,7 +20,7 @@ spec:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/elasticsearch:1.3
|
||||
- image: gcr.io/google_containers/elasticsearch:1.4
|
||||
name: elasticsearch-logging
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
@ -30,14 +30,8 @@ spec:
|
||||
name: es-transport-port
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: token-system-logging
|
||||
mountPath: /etc/token-system-logging
|
||||
readOnly: true
|
||||
- name: es-persistent-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: token-system-logging
|
||||
secret:
|
||||
secretName: token-system-logging
|
||||
- name: es-persistent-storage
|
||||
emptyDir: {}
|
||||
emptyDir: {}
|
||||
|
@ -1,12 +1,16 @@
|
||||
.PHONY: elasticsearch_logging_discovery build push
|
||||
|
||||
TAG = 1.3
|
||||
# Keep this one version ahead to help prevent accidental pushes.
|
||||
TAG = 1.4
|
||||
|
||||
build: elasticsearch_logging_discovery
|
||||
build: elasticsearch_logging_discovery
|
||||
docker build -t gcr.io/google_containers/elasticsearch:$(TAG) .
|
||||
|
||||
push:
|
||||
push:
|
||||
gcloud preview docker push gcr.io/google_containers/elasticsearch:$(TAG)
|
||||
|
||||
elasticsearch_logging_discovery:
|
||||
go build elasticsearch_logging_discovery.go
|
||||
|
||||
clean:
|
||||
rm elasticsearch_logging_discovery
|
||||
|
@ -24,14 +24,9 @@ import (
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
var (
|
||||
kubeconfig = flag.String("kubeconfig", "/etc/token-system-logging/kubeconfig", "kubeconfig file for access")
|
||||
)
|
||||
|
||||
func flattenSubsets(subsets []api.EndpointSubset) []string {
|
||||
ips := []string{}
|
||||
for _, ss := range subsets {
|
||||
@ -46,17 +41,7 @@ func main() {
|
||||
flag.Parse()
|
||||
glog.Info("Kubernetes Elasticsearch logging discovery")
|
||||
|
||||
settings, err := clientcmd.LoadFromFile(*kubeconfig)
|
||||
if err != nil {
|
||||
glog.Fatalf("Error loading configuration from %s: %v", *kubeconfig, err.Error())
|
||||
}
|
||||
|
||||
config, err := clientcmd.NewDefaultClientConfig(*settings, &clientcmd.ConfigOverrides{}).ClientConfig()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to construct config: %v", err)
|
||||
}
|
||||
|
||||
c, err := client.New(config)
|
||||
c, err := client.NewInCluster()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to make client: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user