Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cd4ee140
Commit
cd4ee140
authored
Jan 20, 2017
by
Mik Vyatskov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Elasticsearch image for logging and bump version
parent
8d5227bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
es-controller.yaml
cluster/addons/fluentd-elasticsearch/es-controller.yaml
+1
-1
Makefile
cluster/addons/fluentd-elasticsearch/es-image/Makefile
+1
-1
elasticsearch_logging_discovery.go
...elasticsearch/es-image/elasticsearch_logging_discovery.go
+4
-3
No files found.
cluster/addons/fluentd-elasticsearch/es-controller.yaml
View file @
cd4ee140
...
@@ -20,7 +20,7 @@ spec:
...
@@ -20,7 +20,7 @@ spec:
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
spec
:
spec
:
containers
:
containers
:
-
image
:
gcr.io/google_containers/elasticsearch:v2.4.1
-
image
:
gcr.io/google_containers/elasticsearch:v2.4.1
-1
name
:
elasticsearch-logging
name
:
elasticsearch-logging
resources
:
resources
:
# need more cpu upon initialization, therefore burstable class
# need more cpu upon initialization, therefore burstable class
...
...
cluster/addons/fluentd-elasticsearch/es-image/Makefile
View file @
cd4ee140
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
# The current value of the tag to be used for building and
# The current value of the tag to be used for building and
# pushing an image to gcr.io
# pushing an image to gcr.io
TAG
=
v2.4.1
TAG
=
v2.4.1
-1
build
:
elasticsearch_logging_discovery
build
:
elasticsearch_logging_discovery
docker build
--pull
-t
gcr.io/google_containers/elasticsearch:
$(TAG)
.
docker build
--pull
-t
gcr.io/google_containers/elasticsearch:
$(TAG)
.
...
...
cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go
View file @
cd4ee140
...
@@ -24,6 +24,7 @@ import (
...
@@ -24,6 +24,7 @@ import (
"time"
"time"
"github.com/golang/glog"
"github.com/golang/glog"
meta_v1
"k8s.io/apimachinery/pkg/apis/meta/v1"
restclient
"k8s.io/client-go/rest"
restclient
"k8s.io/client-go/rest"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api"
clientset
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
clientset
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
...
@@ -55,7 +56,7 @@ func main() {
...
@@ -55,7 +56,7 @@ func main() {
namespace
:=
api
.
NamespaceSystem
namespace
:=
api
.
NamespaceSystem
envNamespace
:=
os
.
Getenv
(
"NAMESPACE"
)
envNamespace
:=
os
.
Getenv
(
"NAMESPACE"
)
if
envNamespace
!=
""
{
if
envNamespace
!=
""
{
if
_
,
err
:=
client
.
Core
()
.
Namespaces
()
.
Get
(
envNamespace
);
err
!=
nil
{
if
_
,
err
:=
client
.
Core
()
.
Namespaces
()
.
Get
(
envNamespace
,
meta_v1
.
GetOptions
{}
);
err
!=
nil
{
glog
.
Fatalf
(
"%s namespace doesn't exist: %v"
,
envNamespace
,
err
)
glog
.
Fatalf
(
"%s namespace doesn't exist: %v"
,
envNamespace
,
err
)
}
}
namespace
=
envNamespace
namespace
=
envNamespace
...
@@ -65,7 +66,7 @@ func main() {
...
@@ -65,7 +66,7 @@ func main() {
// Look for endpoints associated with the Elasticsearch loggging service.
// Look for endpoints associated with the Elasticsearch loggging service.
// First wait for the service to become available.
// First wait for the service to become available.
for
t
:=
time
.
Now
();
time
.
Since
(
t
)
<
5
*
time
.
Minute
;
time
.
Sleep
(
10
*
time
.
Second
)
{
for
t
:=
time
.
Now
();
time
.
Since
(
t
)
<
5
*
time
.
Minute
;
time
.
Sleep
(
10
*
time
.
Second
)
{
elasticsearch
,
err
=
client
.
Core
()
.
Services
(
namespace
)
.
Get
(
"elasticsearch-logging"
)
elasticsearch
,
err
=
client
.
Core
()
.
Services
(
namespace
)
.
Get
(
"elasticsearch-logging"
,
meta_v1
.
GetOptions
{}
)
if
err
==
nil
{
if
err
==
nil
{
break
break
}
}
...
@@ -82,7 +83,7 @@ func main() {
...
@@ -82,7 +83,7 @@ func main() {
// Wait for some endpoints.
// Wait for some endpoints.
count
:=
0
count
:=
0
for
t
:=
time
.
Now
();
time
.
Since
(
t
)
<
5
*
time
.
Minute
;
time
.
Sleep
(
10
*
time
.
Second
)
{
for
t
:=
time
.
Now
();
time
.
Since
(
t
)
<
5
*
time
.
Minute
;
time
.
Sleep
(
10
*
time
.
Second
)
{
endpoints
,
err
=
client
.
Core
()
.
Endpoints
(
namespace
)
.
Get
(
"elasticsearch-logging"
)
endpoints
,
err
=
client
.
Core
()
.
Endpoints
(
namespace
)
.
Get
(
"elasticsearch-logging"
,
meta_v1
.
GetOptions
{}
)
if
err
!=
nil
{
if
err
!=
nil
{
continue
continue
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment