Files
faas-cli/schema/metadata.go
Alex Ellis (OpenFaaS Ltd) defd7e46b3 Add annotations to revisionTemplate for knative
* Adds metadata to the knative spec in the generation command
* Fixes: #815

Tested by running locally and verifying it matched the request
from @Jeff-Lowrey

faas-cli generate \
  --api=serving.knative.dev/v1alpha1 \
  --annotation sidecar.istio.io/inject=true

This also works when bringing in annotations from the YAML
file.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-07-01 20:58:23 +01:00

12 lines
419 B
Go

// Copyright (c) OpenFaaS Author(s) 2018. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package schema
// Metadata metadata of the object
type Metadata struct {
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
}