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
|
||||
metadata:
|
||||
name: blog
|
||||
labels:
|
||||
name: blog
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
|
@ -16,11 +14,10 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: git-sync
|
||||
image: k8s.gcr.io/git-sync-amd64:v2.0.6
|
||||
imagePullPolicy: Always
|
||||
image: k8s.gcr.io/git-sync:v3.0.1
|
||||
volumeMounts:
|
||||
- name: markdown
|
||||
mountPath: /git
|
||||
mountPath: /tmp/git
|
||||
env:
|
||||
- name: GIT_SYNC_REPO
|
||||
value: https://github.com/kubernetes/git-sync.git
|
||||
|
|
@ -28,9 +25,6 @@ spec:
|
|||
value: git-sync
|
||||
- name: hugo
|
||||
image: k8s.gcr.io/hugo
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: markdown
|
||||
mountPath: /src
|
||||
|
|
@ -48,8 +42,6 @@ spec:
|
|||
volumeMounts:
|
||||
- name: html
|
||||
mountPath: /usr/share/nginx/html
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumes:
|
||||
- name: markdown
|
||||
emptyDir: {}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ kind: Service
|
|||
metadata:
|
||||
name: blog-service
|
||||
spec:
|
||||
type: "LoadBalancer"
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ volumes: [
|
|||
## 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.
|
||||
|
||||
```
|
||||
{
|
||||
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