Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 396 forks source link

[Ubuntu 16.04 LTS]: draft connect hangs #612

Closed squillace closed 6 years ago

squillace commented 6 years ago

image

Might be related to the sudo issue #611.

radu-matei commented 6 years ago

Do you have the latest version of the packs? The error there happens when the client doesn't find a pod with that annotation - and this happens if the template doesn't contain the annotation.

squillace commented 6 years ago

Dunno. to use it, I rm -rf ~/.draft, which I assume torched the older packs. if not, I need to know how to do that. :-)

radu-matei commented 6 years ago

That should have done the trick. Could you cat charts/templates/deployment.yaml?

squillace commented 6 years ago
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "fullname" . }}
  labels:
    draft: {{ default "draft-app" .Values.draft }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        draft: {{ default "draft-app" .Values.draft }}
        app: {{ template "fullname" . }}
    spec:
      containers:
      - name: {{ .Chart.Name }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: {{ .Values.service.internalPort }}
        resources:
{{ toYaml .Values.resources | indent 12 }}
radu-matei commented 6 years ago

Yup, you don't have the latest version of the pack - either recreate the app (delete stuff and draft create again) or update your deployment.yaml to be:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "fullname" . }}
  labels:
    draft: {{ default "draft-app" .Values.draft }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      annotations:
        buildID: {{ .Values.buildID }}
      labels:
        draft: {{ default "draft-app" .Values.draft }}
        app: {{ template "fullname" . }}
    spec:
      containers:
      - name: {{ .Chart.Name }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: {{ .Values.service.internalPort }}
        resources:
{{ toYaml .Values.resources | indent 12 }}

This most likely happened because you had an existing application created before upgrading - and we must document this somewhere.

squillace commented 6 years ago

resolved