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
55793ac2
Commit
55793ac2
authored
Jan 29, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3972 from derekwaynecarr/fix_etcd_vagrnat
Vagrant fixup for etcd 2.0 regression, and other issues
parents
e619f303
3cb015c0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
5 deletions
+56
-5
default
cluster/saltbase/salt/etcd/default
+6
-2
etcd.service
cluster/saltbase/salt/etcd/etcd.service
+2
-0
init.sls
cluster/saltbase/salt/kube-addons/init.sls
+2
-2
kube-addons.service
cluster/saltbase/salt/kube-addons/kube-addons.service
+1
-1
kube-addons.sh
cluster/saltbase/salt/kube-addons/kube-addons.sh
+40
-0
init.sls
cluster/saltbase/salt/monit/init.sls
+5
-0
No files found.
cluster/saltbase/salt/etcd/default
View file @
55793ac2
{% set hostname = grains.host %}
DAEMON_ARGS="-peer-addr {{hostname}}:7001 -name {{hostname}}"
{% set etcd_servers = "127.0.0.1" -%}
{% if grains.etcd_servers is defined -%}
{% set etcd_servers = grains.etcd_servers -%}
{% endif -%}
DAEMON_ARGS="-addr {{etcd_servers}}:4001 -bind-addr {{etcd_servers}}:4001 -data-dir /var/etcd"
cluster/saltbase/salt/etcd/etcd.service
View file @
55793ac2
...
...
@@ -6,6 +6,8 @@ Documentation=https://github.com/coreos/etcd
Type=simple
EnvironmentFile=/etc/default/etcd
ExecStart=/usr/local/bin/etcd $DAEMON_ARGS
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
cluster/saltbase/salt/kube-addons/init.sls
View file @
55793ac2
...
...
@@ -56,9 +56,9 @@
- user: root
- group: root
/
usr/lib/systemd/scripts/kube-addons
:
/
etc/kubernetes/kube-addons.sh
:
file.managed:
- source: salt://kube-addons/
initd
- source: salt://kube-addons/
kube-addons.sh
- user: root
- group: root
- mode: 755
...
...
cluster/saltbase/salt/kube-addons/kube-addons.service
View file @
55793ac2
...
...
@@ -3,7 +3,7 @@ Description=Kubernetes Addon Object Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/
usr/lib/systemd/scripts/kube-addons start
ExecStart=/
etc/kubernetes/kube-addons.sh
[Install]
WantedBy=multi-user.target
cluster/saltbase/salt/kube-addons/kube-addons.sh
0 → 100644
View file @
55793ac2
#!/bin/bash
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The business logic for whether a given object should be created
# was already enforced by salt, and /etc/kubernetes/addons is the
# managed result is of that. Start everything below that directory.
echo
"== Kubernetes addon manager started at
$(
date
-Is
)
=="
KUBECTL
=
/usr/local/bin/kubectl
for
obj
in
$(
find /etc/kubernetes/addons
-name
\*
.yaml
)
;
do
${
KUBECTL
}
--server
=
"127.0.0.1:8080"
create
-f
${
obj
}
&
echo
"++ addon
${
obj
}
started in pid
$!
++"
done
noerrors
=
"true"
for
pid
in
$(
jobs
-p
)
;
do
wait
${
pid
}
||
noerrors
=
"false"
echo
"++ pid
${
pid
}
complete ++"
done
if
[
${
noerrors
}
==
"true"
]
;
then
echo
"== Kubernetes addon manager completed successfully at
$(
date
-Is
)
=="
else
echo
"== Kubernetes addon manager completed with errors at
$(
date
-Is
)
=="
fi
# We stay around so that status checks by salt make it look like
# the service is good. (We could do this is other ways, but this
# is simple.)
sleep
infinity
cluster/saltbase/salt/monit/init.sls
View file @
55793ac2
{% if grains['os_family'] != 'RedHat' %}
monit:
pkg:
- installed
...
...
@@ -17,3 +19,5 @@ monit-service:
- watch:
- pkg: monit
- file: /etc/monit/conf.d/etcd
{% endif %}
\ No newline at end of file
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