vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

guestbook.jsonnet example is broken

falfaro opened this issue · comments

$ kubecfg update examples/guestbook.jsonnet 
INFO  Validating deployments frontend
INFO  validate object "apps/v1beta2, Kind=Deployment"
INFO  Validating services frontend
INFO  validate object "/v1, Kind=Service"
INFO  Validating deployments redis-master
INFO  validate object "apps/v1beta2, Kind=Deployment"
INFO  Validating services redis-master
INFO  validate object "/v1, Kind=Service"
INFO  Validating deployments redis-slave
INFO  validate object "apps/v1beta2, Kind=Deployment"
INFO  Validating services redis-slave
INFO  validate object "/v1, Kind=Service"
INFO  Fetching schemas for 6 resources
INFO  Updating services frontend
INFO  Creating non-existent services frontend
INFO  Updating services redis-master
INFO  Creating non-existent services redis-master
INFO  Updating services redis-slave
INFO  Creating non-existent services redis-slave
INFO  Updating deployments frontend
INFO  Creating non-existent deployments frontend
INFO  Updating deployments redis-master
INFO  Creating non-existent deployments redis-master
INFO  Updating deployments redis-slave
INFO  Creating non-existent deployments redis-slave
ERROR Error updating deployments redis-slave: Deployment in version "v1beta2" cannot be handled as a Deployment: v1beta2.Deployment\
: Spec: v1beta2.DeploymentSpec: Template: v1.PodTemplateSpec: Spec: v1.PodSpec: Containers: []v1.Container: v1.Container: Env: []v1\
.EnvVar: v1.EnvVar: Value: ReadString: expects " or n, parsing 574 ...,"value":6... at {"apiVersion":"apps/v1beta2","kind":"Deploym\
ent","metadata":{"annotations":{},"labels":{"name":"redis-slave"},"name":"redis-slave"},"spec":{"minReadySeconds":30,"replicas":2,"\
selector":{"matchLabels":{"name":"redis-slave"}},"strategy":{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"Roll\
ingUpdate"},"template":{"metadata":{"annotations":{},"labels":{"name":"redis-slave"}},"spec":{"containers":[{"args":[],"env":[{"nam\
e":"ALLOW_EMPTY_PASSWORD","value":"yes"},{"name":"REDIS_MASTER_HOST","value":"redis-master"},{"name":"REDIS_MASTER_PORT_NUMBER","va\
lue":6379},{"name":"REDIS_REPLICATION_MODE","value":"slave"}],"image":"bitnami/redis:4.0.9","imagePullPolicy":"IfNotPresent","name"\
:"redis","ports":[{"containerPort":6379}],"resources":{"requests":{"cpu":"100m","memory":"100Mi"}},"stdin":false,"tty":false,"volum\
eMounts":[]}],"imagePullSecrets":[],"initContainers":[],"terminationGracePeriodSeconds":30,"volumes":[]}}}}

A fix consists of changing the value for the REDIS_MASTER_PORT_NUMBER key in examples/guestbook.jsonnet to be a literal (enclosed in quotes).

Closed in #222