diff --git a/hack/release.sh b/hack/release.sh index d27471a..6556eab 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -18,7 +18,6 @@ ROOT=$(dirname $BASH_SOURCE[0])/.. source $ROOT/hack/lib/library.sh TAG=$1 - export KO_DOCKER_REPO=docker.io/knativefunctions docker login -p $DOCKER_PASS -u $DOCKER_USER docker.io diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 9167b91..d790916 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2018 The Knative Authors +# Copyright 2019 The Knative Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/reconciler/functions/functions.go b/pkg/reconciler/functions/functions.go index 14b5faf..b19d0e1 100644 --- a/pkg/reconciler/functions/functions.go +++ b/pkg/reconciler/functions/functions.go @@ -325,7 +325,7 @@ func (r *Reconciler) reconcileService(ctx context.Context, fn *duckv1alpha1.Func return nil, errors.New("Missing functions.knative.dev/image annotation on function CRD") } - expected := resources.MakeKnativeService(r.functionName, string(cm.UID), image) + expected := resources.MakeKnativeService(r.functionName, cm.ResourceVersion, image) // Update service annotation with config map UUID. service, err := r.serviceLister.Services("knative-functions").Get(r.functionName) diff --git a/pkg/reconciler/functions/resources/ksvc.go b/pkg/reconciler/functions/resources/ksvc.go index e30530d..d64fa0e 100644 --- a/pkg/reconciler/functions/resources/ksvc.go +++ b/pkg/reconciler/functions/resources/ksvc.go @@ -24,11 +24,11 @@ import ( ) const ( - ConfigMapAnnotation = "functions.knative.dev/cm-uuid" + ConfigMapAnnotation = "functions.knative.dev/cm-resourceVersion" ) // MakeKnativeService create a knative service -func MakeKnativeService(functionName string, cmuuid, image string) *servingv1beta1.Service { +func MakeKnativeService(functionName string, version, image string) *servingv1beta1.Service { return &servingv1beta1.Service{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1beta1", @@ -45,7 +45,7 @@ func MakeKnativeService(functionName string, cmuuid, image string) *servingv1bet ConfigurationSpec: servingv1beta1.ConfigurationSpec{ Template: servingv1beta1.RevisionTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ConfigMapAnnotation: cmuuid}, + Annotations: map[string]string{ConfigMapAnnotation: version}, }, Spec: servingv1beta1.RevisionSpec{ PodSpec: corev1.PodSpec{