Skip to content

Commit

Permalink
fix elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
lavalamp committed Jun 3, 2015
1 parent d19490d commit 40eb159
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
10 changes: 2 additions & 8 deletions cluster/addons/fluentd-elasticsearch/es-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {}
10 changes: 7 additions & 3 deletions cluster/addons/fluentd-elasticsearch/es-image/Makefile
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
Expand Down

0 comments on commit 40eb159

Please sign in to comment.