Skip to content

Commit 7cce126

Browse files
committed
annotate with cm resource version
1 parent 262f78c commit 7cce126

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

hack/release.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ ROOT=$(dirname $BASH_SOURCE[0])/..
1818
source $ROOT/hack/lib/library.sh
1919

2020
TAG=$1
21-
2221
export KO_DOCKER_REPO=docker.io/knativefunctions
2322
docker login -p $DOCKER_PASS -u $DOCKER_USER docker.io
2423

hack/update-codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2018 The Knative Authors
3+
# Copyright 2019 The Knative Authors
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

pkg/reconciler/functions/functions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func (r *Reconciler) reconcileService(ctx context.Context, fn *duckv1alpha1.Func
325325
return nil, errors.New("Missing functions.knative.dev/image annotation on function CRD")
326326
}
327327

328-
expected := resources.MakeKnativeService(r.functionName, string(cm.UID), image)
328+
expected := resources.MakeKnativeService(r.functionName, cm.ResourceVersion, image)
329329

330330
// Update service annotation with config map UUID.
331331
service, err := r.serviceLister.Services("knative-functions").Get(r.functionName)

pkg/reconciler/functions/resources/ksvc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import (
2424
)
2525

2626
const (
27-
ConfigMapAnnotation = "functions.knative.dev/cm-uuid"
27+
ConfigMapAnnotation = "functions.knative.dev/cm-resourceVersion"
2828
)
2929

3030
// MakeKnativeService create a knative service
31-
func MakeKnativeService(functionName string, cmuuid, image string) *servingv1beta1.Service {
31+
func MakeKnativeService(functionName string, version, image string) *servingv1beta1.Service {
3232
return &servingv1beta1.Service{
3333
TypeMeta: metav1.TypeMeta{
3434
APIVersion: "v1beta1",
@@ -45,7 +45,7 @@ func MakeKnativeService(functionName string, cmuuid, image string) *servingv1bet
4545
ConfigurationSpec: servingv1beta1.ConfigurationSpec{
4646
Template: servingv1beta1.RevisionTemplateSpec{
4747
ObjectMeta: metav1.ObjectMeta{
48-
Annotations: map[string]string{ConfigMapAnnotation: cmuuid},
48+
Annotations: map[string]string{ConfigMapAnnotation: version},
4949
},
5050
Spec: servingv1beta1.RevisionSpec{
5151
PodSpec: corev1.PodSpec{

0 commit comments

Comments
 (0)