ChannelFinder / ChannelFinderService

A RESTful directory services for a list channels
MIT License
9 stars 15 forks source link

Add a helm chart for kubernetes deployment #162

Open stan-dot opened 22 hours ago

stan-dot commented 21 hours ago

deployent needs to reference an existing image


apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "channelfinder.fullname" . }}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: {{ include "channelfinder.name" . }}
  template:
    metadata:
      labels:
        app: {{ include "channelfinder.name" . }}
    spec:
      containers:
        - name: channelfinder
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: {{ .Values.service.port }}
          env:
            - name: ELASTICSEARCH_NETWORK_HOST
              value: "elasticsearch-cf"
          command:
            - /bin/bash
            - -c
            - |
              until curl --silent --fail http://elasticsearch-cf:9200/_cluster/health; do
                echo 'Waiting for Elasticsearch';
                sleep 1;
              done;
              java -jar /channelfinder/ChannelFinder-*.jar
          volumeMounts:
            - name: es-data
              mountPath: /usr/share/elasticsearch/data
      volumes:
        - name: es-data
          persistentVolumeClaim:
            claimName: es-data
stan-dot commented 21 hours ago

all existing images seem old https://hub.docker.com/search?q=channelfinder

stan-dot commented 21 hours ago

might choose to push to the DLS registry

https://dev-portal.diamond.ac.uk/guide/kubernetes/tutorials/containers/

stan-dot commented 21 hours ago

with this


image:
  repository: channelfinder
  tag: "latest"
  pullPolicy: IfNotPresent

https://confluence.diamond.ac.uk/display/CLOUD/Container+Registry

stan-dot commented 20 hours ago

helm upgrade --install channelfinder helm --namespace $NAMESPACE Error: UPGRADE FAILED: cannot patch "channelfinder-helm" with kind Deployment: admission webhook "mutate.kyverno.svc-fail" denied the request: failed to add image information to the policy rule context: invalid image :alpha

tag invalid?

stan-dot commented 20 hours ago

ah, either semver or latest I guess

stan-dot commented 20 hours ago

latest also not accepted for some reason

stan-dot commented 20 hours ago

0.1.0 is also failing

helm upgrade --install channelfinder helm --namespace $NAMESPACE Error: UPGRADE FAILED: cannot patch "channelfinder-helm" with kind Deployment: admission webhook "mutate.kyverno.svc-fail" denied the request: failed to add image information to the policy rule context: invalid image :0.1.0