support dialects for Kubernetes #1014
Comments
This would be really useful for controlling pod placement: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
As a Vamp user i want to be able to add Kubernetes specific dialects to a blueprint so i can use the K8s affinity and nodeselector options on a Pod level. At first we need to support "nodeName", "nodeSelector" and "tolerations". Vamp input:
K8s Pod YAML output:
input:
output:
Tolerations Vamp input:
K8s Tolerations output:
|
Also add support for Volumes: Volume mounts: https://github.com/kubernetes/examples/blob/master/staging/volumes/azure_disk/azure.yaml#L9 Volumes: https://github.com/kubernetes/examples/blob/master/staging/volumes/azure_disk/azure.yaml#L12 |
Under the hood Vamp uses Kubernetes deployments. All dialect data are applied to pod spec Example 1, adding custom non-container specific data: name: busy-top:1.0
clusters:
busyboxes:
services:
breed:
name: busybox
deployable: registry.example.com/busybox:latest
dialects:
kubernetes:
dnsPolicy: ClusterFirst
nodeName: aci-connector Pod Vamp manages Example 2, adding custom container specific data: name: busy-top:1.0
clusters:
busyboxes:
services:
breed:
name: busybox
deployable: registry.example.com/busybox:latest
dialects:
kubernetes:
containers:
- volumeMounts:
- name: azure
mountPath: /mnt/azure
volumes:
- name: azure
azureDisk:
diskName: test.vhd
diskURI: https://someaccount.blob.microsoft.net/vhds/test.vhd Setting ...
dialects:
kubernetes:
containers:
- image: busybox:evil # ignored, because breed deployable will be used
volumeMounts: # will be applied
- name: azure
mountPath: /mnt/azure
... Note 1: pod |
Re-opening this with a comment from @stuartleeks "When I specify |
The scenario I was just testing is VAMP on k8s with the virtual-kubelet connector to expose Azure Container Instances (ACI) as a node in kubernetes. Deploying to ACI requires the memory to be a multiple of 0.1GB, and with the VAMP->k8s conversion that currently happens I can't achieve that! |
@olafmol this is not related to dialects but common handling of Vamp scale (apparently since the first implementation magneticio/vamp-kubernetes@f50cd03#diff-4c2a3fc4f73214f17be9ab559248eb5eR34). In this case should use different units https://github.com/magneticio/vamp/blob/master/kubernetes/src/main/scala/io/vamp/container_driver/kubernetes/KubernetesApp.scala#L35 |
How can we extend this to also include imagePullSecrets?
Currently it seems to be dropped/ignored? |
@olafmol did you try something like this: name: busy-top:1.0
kind: blueprints
clusters:
busyboxes:
services:
breed: registry.example.com/busybox:latest
dialects:
kubernetes:
imagePullSecrets:
- name: regcred
dialects:
kubernetes:
containers:
...
imagePullSecrets:
- name: regcred Compare it also with this example: https://raw.githubusercontent.com/kubernetes/website/master/docs/tasks/configure-pod-container/private-reg-pod.yaml |
no go :-( I do not see the |
@rudivandrunen-spronq which version of Vamp do you use? |
Hi Drago,
Same thing... :-( |
@rudivandrunen-spronq could you please try again with Vamp v0956 ? tnx! |
f.e. for annotations to setup specific security roles
The text was updated successfully, but these errors were encountered: