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
9f48a2f4
Commit
9f48a2f4
authored
Apr 01, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an nginx docker image for use on the master.
parent
4adc20e9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
0 deletions
+109
-0
Dockerfile
cluster/images/nginx/Dockerfile
+6
-0
Makefile
cluster/images/nginx/Makefile
+14
-0
README.md
cluster/images/nginx/README.md
+7
-0
backports.list
cluster/images/nginx/backports.list
+1
-0
init.sls
cluster/saltbase/salt/nginx/init.sls
+26
-0
nginx.json
cluster/saltbase/salt/nginx/nginx.json
+55
-0
No files found.
cluster/images/nginx/Dockerfile
0 → 100644
View file @
9f48a2f4
FROM
google/debian:wheezy
COPY
backports.list /etc/apt/sources.list.d/backports.list
RUN
apt-get update
RUN
apt-get
-t
wheezy-backports
-yy
-q
install
nginx
cluster/images/nginx/Makefile
0 → 100644
View file @
9f48a2f4
### Nginx image
# This image is used to run nginx on the master.
# Current 'live' version is v1
# Please make sure that you update this comment if you build/push new
# versions.
VERSION
=
v2
all
:
docker build
-t
gcr.io/google_containers/nginx:
${
VERSION
}
.
gcloud preview docker push gcr.io/google_containers/nginx:
${
VERSION
}
.PHONY
:
all
cluster/images/nginx/README.md
0 → 100644
View file @
9f48a2f4
### Nginx image
This image is used to run nginx on the master.
#### Instructions
make
cluster/images/nginx/backports.list
0 → 100644
View file @
9f48a2f4
deb http://gce_debian_mirror.storage.googleapis.com wheezy-backports main non-free
cluster/saltbase/salt/nginx/init.sls
View file @
9f48a2f4
...
...
@@ -28,6 +28,30 @@ nginx:
- group: root
- mode: 644
{% if grains.cloud in ['gce'] %}
/etc/kubernetes/manifests/nginx.json:
file:
- managed
- source: salt://nginx/nginx.json
- user: root
- group: root
- mode: 644
- require:
- file: /etc/nginx/nginx.conf
- file: /etc/nginx/sites-enabled/default
- file: /usr/share/nginx/htpasswd
- cmd: kubernetes-cert
#stop legacy nginx_service
stop_nginx-service:
service.dead:
- name: nginx
- enable: None
- watch:
- file: /etc/kubernetes/manifests/nginx.json
{% else %}
nginx-service:
service:
- running
...
...
@@ -38,3 +62,5 @@ nginx-service:
- file: /etc/nginx/sites-enabled/default
- file: /usr/share/nginx/htpasswd
- cmd: kubernetes-cert
{% endif %}
cluster/saltbase/salt/nginx/nginx.json
0 → 100644
View file @
9f48a2f4
{
"apiVersion"
:
"v1beta3"
,
"kind"
:
"Pod"
,
"metadata"
:
{
"name"
:
"nginx"
},
"spec"
:{
"hostNetwork"
:
true
,
"containers"
:[
{
"name"
:
"nginx"
,
"image"
:
"gcr.io/google-containers/nginx:v1"
,
"command"
:
[
"nginx"
,
"-g"
,
"daemon off;"
],
"ports"
:[
{
"name"
:
"https"
,
"containerPort"
:
443
,
"hostPort"
:
443
}
],
"volumeMounts"
:
[
{
"name"
:
"nginx"
,
"mountPath"
:
"/etc/nginx"
,
"readOnly"
:
true
},
{
"name"
:
"k8s"
,
"mountPath"
:
"/srv/kubernetes"
,
"readOnly"
:
true
},
{
"name"
:
"logs"
,
"mountPath"
:
"/var/log/nginx"
,
"readOnly"
:
false
},
{
"name"
:
"passwd"
,
"mountPath"
:
"/usr/share/nginx"
,
"readOnly"
:
true
}
]
}
],
"volumes"
:[
{
"name"
:
"nginx"
,
"hostPath"
:
{
"path"
:
"/etc/nginx"
}
},
{
"name"
:
"k8s"
,
"hostPath"
:
{
"path"
:
"/srv/kubernetes"
}
},
{
"name"
:
"passwd"
,
"hostPath"
:
{
"path"
:
"/usr/share/nginx"
}
},
{
"name"
:
"logs"
,
"hostPath"
:
{
"path"
:
"/var/logs/nginx"
}
}
]
}}
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