Merge pull request #121 from thockin/fix-hugo-demo
Fix hugo demo and docs
This commit is contained in:
commit
8ef40b88e5
|
|
@ -1,9 +1,7 @@
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: blog
|
name: blog
|
||||||
labels:
|
|
||||||
name: blog
|
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -16,11 +14,10 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: git-sync
|
- name: git-sync
|
||||||
image: k8s.gcr.io/git-sync-amd64:v2.0.6
|
image: k8s.gcr.io/git-sync:v3.0.1
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: markdown
|
- name: markdown
|
||||||
mountPath: /git
|
mountPath: /tmp/git
|
||||||
env:
|
env:
|
||||||
- name: GIT_SYNC_REPO
|
- name: GIT_SYNC_REPO
|
||||||
value: https://github.com/kubernetes/git-sync.git
|
value: https://github.com/kubernetes/git-sync.git
|
||||||
|
|
@ -28,9 +25,6 @@ spec:
|
||||||
value: git-sync
|
value: git-sync
|
||||||
- name: hugo
|
- name: hugo
|
||||||
image: k8s.gcr.io/hugo
|
image: k8s.gcr.io/hugo
|
||||||
imagePullPolicy: Always
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 0
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: markdown
|
- name: markdown
|
||||||
mountPath: /src
|
mountPath: /src
|
||||||
|
|
@ -48,8 +42,6 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: html
|
- name: html
|
||||||
mountPath: /usr/share/nginx/html
|
mountPath: /usr/share/nginx/html
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: markdown
|
- name: markdown
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: blog-service
|
name: blog-service
|
||||||
spec:
|
spec:
|
||||||
type: "LoadBalancer"
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
selector:
|
selector:
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ volumes: [
|
||||||
## Step 3: Configure git-sync container
|
## Step 3: Configure git-sync container
|
||||||
|
|
||||||
In your git-sync container configuration, mount the Secret Volume at "/etc/git-secret". Ensure that the environment variable GIT_SYNC_REPO is set to use a URL with the SSH protocol, and set GIT_SYNC_SSH to true.
|
In your git-sync container configuration, mount the Secret Volume at "/etc/git-secret". Ensure that the environment variable GIT_SYNC_REPO is set to use a URL with the SSH protocol, and set GIT_SYNC_SSH to true.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
name: "git-sync",
|
name: "git-sync",
|
||||||
|
|
@ -82,9 +83,7 @@ In your git-sync container configuration, mount the Secret Volume at "/etc/git-s
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
],
|
],
|
||||||
securityContext: {
|
|
||||||
"runAsUser": 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
**Note:** Kubernetes mounts the Secret with permissions 0444 by default (not restrictive enough to be used as an SSH key), so make sure you use secret volume with `defaultMode: 256` (decimal number for octal 0400) and run the container as root.
|
|
||||||
|
**Note:** Kubernetes mounts the Secret with permissions 0444 by default (not restrictive enough to be used as an SSH key), so make sure you use secret volume with `defaultMode: 256` (decimal number for octal 0400).
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue