Skip to content
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

Container image version #1721

Closed
pieterv-icloud-com opened this issue Jul 17, 2023 · 4 comments · Fixed by #1726
Closed

Container image version #1721

pieterv-icloud-com opened this issue Jul 17, 2023 · 4 comments · Fixed by #1726
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pieterv-icloud-com
Copy link

pieterv-icloud-com commented Jul 17, 2023

Hi, I have a helm chart which is used by argo to deploy a workload, the parameters for the chart looks like this:

image:
  repository: localhost:5000/node-web-app
  tag: 0.0.1

This refers to a local docker registry in minikube.

When the workload is created by the toolkit it looks like this:

apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnWorkload
metadata:
  creationTimestamp: "2023-07-16T17:06:58Z"
  generation: 2
  name: alm-toolkit-node-web-app
  namespace: alm-toolkit
  ownerReferences:
  - apiVersion: apps/v1
    kind: ReplicaSet
    name: node-web-app-bc986f57b
    uid: 608af0c8-5e78-476b-9c1f-c8530f8479ae
  resourceVersion: "3343"
  uid: ac4ebdc1-e88a-46d6-b4d8-0468aac3fb27
spec:
  app: alm-toolkit
  resourceReference:
    kind: ReplicaSet
    name: node-web-app-855db64bc5
    uid: 96248dcf-0208-4cb0-b58f-52a65e7eda95
  version: 5000/node-web-app

Notice the version contains the container registry and port.

Also other log entries point to the same issue:

2023-07-16T17:55:49Z    ERROR   KeptnWorkload Controller        could not create Workload Instance      {"error": "KeptnWorkloadInstance.lifecycle.keptn.sh \"alm-toolkit-node-web-app-5000/node-web-app\" is invalid: metadata.name: Invalid value: \"alm-toolkit-node-web-app-5000/node-web-app\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"}
github.com/keptn/lifecycle-toolkit/operator/controllers/lifecycle/keptnworkload.(*KeptnWorkloadReconciler).Reconcile
        /workspace/controllers/lifecycle/keptnworkload/controller.go:105
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
@mowies mowies added the bug Something isn't working label Jul 17, 2023
@RealAnna
Copy link
Contributor

RealAnna commented Jul 17, 2023

Hi @pieterv-icloud-com thanks for pointing this there is a bug in our version extraction

@pieterv-icloud-com
Copy link
Author

pieterv-icloud-com commented Jul 17, 2023

Hi so the image value within my deployment is:

image: localhost:5000/node-web-app:0.0.1

Unfortunately I cannot change this because the docker registry is running on localhost port 5000, the keptn workload is created automatically

@mowies mowies moved this to 🏃 In progress in Keptn Lifecycle Toolkit Jul 17, 2023
@mowies mowies added this to the 0.9 milestone Jul 17, 2023
@pieterv-icloud-com
Copy link
Author

I use argocd image updater to monitor the docker registry. for new versions of the container image and then to automatically update the image to the newer version.

I would like keptn to pick up the container changes and execute tasks for it

@RealAnna
Copy link
Contributor

RealAnna commented Jul 17, 2023

@pieterv-icloud-com you can find the fix in #1726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants