Skip to content

Commit

Permalink
Add the field version into knativeserving spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Hou committed May 26, 2020
1 parent d544f7c commit fc90c53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions config/300-serving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ spec:
spec:
description: Spec defines the desired state of KnativeServing
properties:
version:
description: The version of Knative Serving to be installed
type: string
config:
additionalProperties:
additionalProperties:
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/knativeserving/knativeserving.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"fmt"
"os"
"path/filepath"
"path/filepath"
"github.com/go-logr/zapr"

mf "github.com/manifestival/manifestival"
Expand Down Expand Up @@ -228,7 +228,7 @@ func (r *Reconciler) deleteObsoleteResources(ctx context.Context, manifest *mf.M
return nil
}

func (r *Reconciler) retrieveManifest(ctx context.Context, version string) (mf.Manifest, error){
func (r *Reconciler) retrieveManifest(ctx context.Context, version string) (mf.Manifest, error) {
if val, found := r.manifests[version]; found {
return val, nil
}
Expand All @@ -248,7 +248,7 @@ func (r *Reconciler) retrieveManifest(ctx context.Context, version string) (mf.M
return manifest, nil
}

func (r *Reconciler) retrieveVersions(instance *servingv1alpha1.KnativeServing) (string, string){
func (r *Reconciler) retrieveVersions(instance *servingv1alpha1.KnativeServing) (string, string) {
oldVersion := version.ServingVersion
newVersion := version.ServingVersion
if instance.Status.GetVersion() != "" {
Expand Down

0 comments on commit fc90c53

Please sign in to comment.