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
0c60cfc9
Commit
0c60cfc9
authored
Jul 04, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the way addon-manager handles non-namespaced objects
parent
ef3f2fb1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
9 deletions
+11
-9
Makefile
cluster/addons/addon-manager/Makefile
+1
-1
kube-addon-update.sh
cluster/addons/addon-manager/kube-addon-update.sh
+7
-5
influxdb-pv.yaml
cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml
+0
-1
addon-manager.json
cluster/images/hyperkube/static-pods/addon-manager.json
+1
-1
kube-addon-manager.yaml
cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml
+2
-1
No files found.
cluster/addons/addon-manager/Makefile
View file @
0c60cfc9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
IMAGE
=
gcr.io/google-containers/kube-addon-manager
IMAGE
=
gcr.io/google-containers/kube-addon-manager
ARCH
?=
amd64
ARCH
?=
amd64
TEMP_DIR
:=
$(
shell
mktemp
-d
)
TEMP_DIR
:=
$(
shell
mktemp
-d
)
VERSION
=
v5
VERSION
=
v5
.1
# amd64 and arm has "stable" binaries pushed for v1.2, arm64 and ppc64le hasn't so they have to fetch the latest alpha
# amd64 and arm has "stable" binaries pushed for v1.2, arm64 and ppc64le hasn't so they have to fetch the latest alpha
# however, arm64 and ppc64le are very experimental right now, so it's okay
# however, arm64 and ppc64le are very experimental right now, so it's okay
...
...
cluster/addons/addon-manager/kube-addon-update.sh
View file @
0c60cfc9
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
# 3. kubectl prints the output to stderr (the output should be captured and then
# 3. kubectl prints the output to stderr (the output should be captured and then
# logged)
# logged)
# global config
# global config
KUBECTL
=
${
TEST_KUBECTL
:-}
# substitute for tests
KUBECTL
=
${
TEST_KUBECTL
:-}
# substitute for tests
KUBECTL
=
${
KUBECTL
:-${
KUBECTL_BIN
:-}}
KUBECTL
=
${
KUBECTL
:-${
KUBECTL_BIN
:-}}
...
@@ -133,7 +131,7 @@ try:
...
@@ -133,7 +131,7 @@ try:
try:
try:
print "%s/%s" % (y["metadata"]["namespace"], y["metadata"]["name"])
print "%s/%s" % (y["metadata"]["namespace"], y["metadata"]["name"])
except Exception, ex:
except Exception, ex:
print "
default
/%s" % y["metadata"]["name"]
print "/%s" % y["metadata"]["name"]
except Exception, ex:
except Exception, ex:
print "ERROR"
print "ERROR"
'''
'''
...
@@ -198,7 +196,7 @@ function run-until-success() {
...
@@ -198,7 +196,7 @@ function run-until-success() {
# returns a list of <namespace>/<name> pairs (nsnames)
# returns a list of <namespace>/<name> pairs (nsnames)
function
get-addon-nsnames-from-server
()
{
function
get-addon-nsnames-from-server
()
{
local
-r
obj_type
=
$1
local
-r
obj_type
=
$1
"
${
KUBECTL
}
"
get
"
${
obj_type
}
"
--all-namespaces
-o
go-template
=
"{{range.items}}{{.metadata.namespace}}/{{.metadata.name}} {{end}}"
-l
kubernetes.io/cluster-service
=
true
"
${
KUBECTL
}
"
get
"
${
obj_type
}
"
--all-namespaces
-o
go-template
=
"{{range.items}}{{.metadata.namespace}}/{{.metadata.name}} {{end}}"
-l
kubernetes.io/cluster-service
=
true
|
sed
's/<no value>//g'
}
}
# returns the characters after the last separator (including)
# returns the characters after the last separator (including)
...
@@ -262,7 +260,11 @@ function create-object() {
...
@@ -262,7 +260,11 @@ function create-object() {
log INFO
"Creating new
${
obj_type
}
from file
${
file_path
}
in namespace
${
namespace
}
, name:
${
obj_name
}
"
log INFO
"Creating new
${
obj_type
}
from file
${
file_path
}
in namespace
${
namespace
}
, name:
${
obj_name
}
"
# this will keep on failing if the ${file_path} disappeared in the meantime.
# this will keep on failing if the ${file_path} disappeared in the meantime.
# Do not use too many retries.
# Do not use too many retries.
run-until-success
"
${
KUBECTL
}
create --namespace=
${
namespace
}
-f
${
file_path
}
"
${
NUM_TRIES
}
${
DELAY_AFTER_ERROR_SEC
}
if
[[
-n
"
${
namespace
}
"
]]
;
then
run-until-success
"
${
KUBECTL
}
create --namespace=
${
namespace
}
-f
${
file_path
}
"
${
NUM_TRIES
}
${
DELAY_AFTER_ERROR_SEC
}
else
run-until-success
"
${
KUBECTL
}
create -f
${
file_path
}
"
${
NUM_TRIES
}
${
DELAY_AFTER_ERROR_SEC
}
fi
}
}
function
update-object
()
{
function
update-object
()
{
...
...
cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml
View file @
0c60cfc9
...
@@ -5,7 +5,6 @@ kind: PersistentVolume
...
@@ -5,7 +5,6 @@ kind: PersistentVolume
apiVersion
:
v1
apiVersion
:
v1
metadata
:
metadata
:
name
:
influxdb-pv
name
:
influxdb-pv
namespace
:
kube-system
labels
:
labels
:
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
spec
:
spec
:
...
...
cluster/images/hyperkube/static-pods/addon-manager.json
View file @
0c60cfc9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"containers"
:
[
"containers"
:
[
{
{
"name"
:
"kube-addon-manager"
,
"name"
:
"kube-addon-manager"
,
"image"
:
"gcr.io/google-containers/kube-addon-manager-ARCH:v
4
"
,
"image"
:
"gcr.io/google-containers/kube-addon-manager-ARCH:v
5.1
"
,
"resources"
:
{
"resources"
:
{
"requests"
:
{
"requests"
:
{
"cpu"
:
"5m"
,
"cpu"
:
"5m"
,
...
...
cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml
View file @
0c60cfc9
...
@@ -10,7 +10,8 @@ spec:
...
@@ -10,7 +10,8 @@ spec:
hostNetwork
:
true
hostNetwork
:
true
containers
:
containers
:
-
name
:
kube-addon-manager
-
name
:
kube-addon-manager
image
:
gcr.io/google-containers/kube-addon-manager:v5
# When updating version also bump it in cluster/images/hyperkube/static-pods/addon-manager.json
image
:
gcr.io/google-containers/kube-addon-manager:v5.1
resources
:
resources
:
requests
:
requests
:
cpu
:
5m
cpu
:
5m
...
...
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