-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deploy/kubernetes): custom volume mnt per svc #1110
feat(deploy/kubernetes): custom volume mnt per svc #1110
Conversation
add custom `ConfigMap` or `Secret` volume mounts at the service level. This allows you to mount extra config or secrets as needed.
43328d9
to
02c523f
Compare
Nice |
I'll add this to the documentation but for now, here's an example of how to add it to your service settings
|
* master: feat(deploy/kubernetes): custom volume mnt per svc (spinnaker#1110) refactor(core): Push validation logic to base class (spinnaker#1108)
I just installed Halyard nightly kubernetes:
volumes:
- id: echo-webhook-templates
type: secret
mountPath: /mnt/webhook-templates
podAnnotations:
testannotation: here Does something need to happen to get this change into a nightly to try out? |
The date on the nightly looks correct, was built yesterday morning -- maybe @ethanfrogers knows what's up? |
Very odd! I'll double check it. |
@tillig I just installed the same build and it's working for me. How did you install the nightly? Install script or Docker image? |
I used the install script. Admittedly I had the stable version installed already and installed nightly over the top. Maybe I need to do a clean uninstall and restore my config from backup post-reinstall? I'll give it a shot today. |
I'm having no luck and I'm not sure why. Backed up my config and did a full Noticed that Downloaded the nightly version of Restored my configuration with
kubernetes:
volumes:
- id: echo-webhook-templates
type: secret
mountPath: /mnt/webhook-templates I can get the secret, no problem. However, after apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: "<truncated>"
moniker.spinnaker.io/application: '"spin"'
moniker.spinnaker.io/cluster: '"echo"'
creationTimestamp: 2018-12-10T16:45:23Z
generation: 1
labels:
app: spin
app.kubernetes.io/managed-by: halyard
app.kubernetes.io/name: echo
app.kubernetes.io/part-of: spinnaker
app.kubernetes.io/version: 1.10.5
cluster: spin-echo
name: spin-echo
namespace: spinnaker
resourceVersion: "5294022"
selfLink: /apis/extensions/v1beta1/namespaces/spinnaker/deployments/spin-echo
uid: fd335fe6-fc9a-11e8-8561-ee8b8d3710af
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: spin
cluster: spin-echo
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: spin
app.kubernetes.io/managed-by: halyard
app.kubernetes.io/name: echo
app.kubernetes.io/part-of: spinnaker
app.kubernetes.io/version: 1.10.5
cluster: spin-echo
spec:
containers:
- env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-XX:MaxRAMFraction=2
- name: SPRING_PROFILES_ACTIVE
value: local
image: gcr.io/spinnaker-marketplace/echo:2.1.2-20181113042810
imagePullPolicy: IfNotPresent
lifecycle: {}
name: echo
ports:
- containerPort: 8089
protocol: TCP
readinessProbe:
exec:
command:
- wget
- --no-check-certificate
- --spider
- -q
- http://localhost:8089/health
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/spinnaker/config
name: spin-echo-files-1024083987
- mountPath: /opt/spinnaker-monitoring/config
name: spin-echo-files-1144163964
- mountPath: /opt/spinnaker-monitoring/registry
name: spin-echo-files-1658044194
- env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-XX:MaxRAMFraction=2
- name: SPRING_PROFILES_ACTIVE
value: local
image: gcr.io/spinnaker-marketplace/monitoring-daemon:0.9.2-20181108172516
imagePullPolicy: IfNotPresent
lifecycle: {}
name: monitoring-daemon
ports:
- containerPort: 8008
protocol: TCP
readinessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 8008
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/spinnaker/config
name: spin-echo-files-1024083987
- mountPath: /opt/spinnaker-monitoring/config
name: spin-echo-files-1144163964
- mountPath: /opt/spinnaker-monitoring/registry
name: spin-echo-files-1658044194
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 60
volumes:
- name: spin-echo-files-1024083987
secret:
defaultMode: 420
secretName: spin-echo-files-1024083987
- name: spin-echo-files-1658044194
secret:
defaultMode: 420
secretName: spin-echo-files-1658044194
- name: spin-echo-files-1144163964
secret:
defaultMode: 420
secretName: spin-echo-files-1144163964
status:
availableReplicas: 1
conditions:
- lastTransitionTime: 2018-12-10T16:46:26Z
lastUpdateTime: 2018-12-10T16:46:26Z
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: 2018-12-10T16:45:23Z
lastUpdateTime: 2018-12-10T16:46:26Z
message: ReplicaSet "spin-echo-7ff78f6479" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1 I truncated the last applied configuration for easier reading. Point being, there's no secret mount in there from my echo.yml. If I search for anything with
...there are no results. It's not in there. Am I doing something wrong? Putting the |
@tillig feel free to ping me on slack to do some more debugging! |
For better or worse (mostly worse)... our company has Slack blocked. 😢 |
Let me give it a shot with the nightly. I installed |
@tillig apparently I can't' install the nightly using the |
I had a good time learning about challenges with Docker for Windows alongside Windows Subsystem for Linux and Hyper-V in the last day trying to get this working. (Halyard works just fine in WSL running Ubuntu, BTW, but Docker on Windows is a nightmare.) Anyway, turns out while I was doing all that Halyard got released 1.13 as stable and I could throw all that out, run Thanks for your patience in helping me work through this. I'm guessing there may be odd challenges around installing a nightly over a stable release; clean uninstalls of Halyard (it isn't clean at all); and all that combining to be a bad install that didn't include everything it needed. |
add custom
ConfigMap
orSecret
volume mounts at the service level.This allows you to mount extra config or secrets as needed.