The readonly_root_filesystem setting was not included in the resulting
CRD when running faas-cli generate.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
The Knative serving service we were generating was out of
date, this PR changes that to work with the latest schema.
Changes have been tested with env vars and --tag=sha
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Changing api version in generate command since it was
outdated v1alpha2. The following changes took place:
* duplicated v1alpha2 package to v1 to avoid confusion
* updated examples to point to the right version
* updated default value to be v1 instead of v1alpha2
* fixed a bug where default namespace is unset
Signed-off-by: Martin Dekov <mvdekov@gmail.com>
* 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>
This commit updates the secret commands to use `Secret` struct from the
faas-provider rather than using it's own struct.
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
**What**
- Create and move exec commands to a new exec package, this will make it
easier to reuse in the future "install" command
- Move git related commands to the versioncontrol package to keep the
git related commands together and easy to find.
- Implement flags interfaces for the BuildFormat so that the flags
package can set and validate this value directly and then we can
directly pass this value around to improve type safety in the throughout
- Renames the `tag` variable to `tagFormat` to improve readability, the
value is not directly the tag value and this could be confusing before.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**What**
- Adds new GetGitDescribe ouput command, use this command in the build,
deploy, generate, and push commands.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**What**
- Remove the log schema and replace with the schema defined in the
provider. This ensures that the cli uses the same schema as the
providers.
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**What**
- Add schema for log request and response
- Add command for printing the log stream
- Support passing since value as timestamp or duration
- Add some unit tests
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
This commit refactor openfaas crd schema puts it inside a package with
a version name so that it's easy to add new version for openfaas CRD
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit projects secrets into the Knative CRD YAML, however
it appears that the CRD validator for the Service object will
now allow multiple volumes to be mounted into the same directory
which breaks compatiability with OpenFaaS on Kubernetes.
A separate directory is used for each secret with the key so
that "aws" will be mounted at /var/openfaas/secrets/aws/name.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit adds the ability to generate a knative serving
definition from the Function Store or a stack.yaml file with
a basic definition including: namespace, name, env-vars and
image.
Tested with Istio on Packet.net using figlet.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit adds `faas-cli secret list` command to the faas-cli which
will be used to get secret list from the cluster.
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit prints labels and annotations in `faas-cli describe` command
whenever it is available.
Fixes: #533
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
Adding support for annotations through annotation flag
to the faas-cli deploy and store-deploy.
Signed-off-by: Martin Dekov (VMware) <mdekov@vmware.com>
Add `ReadOnlyRootFilesystem` to `StoreItem` schema and implement the
field within `commands/store_deploy.go`. This change will allow store
functions that are read-only to take affect.
Fixes: #490
Signed-off-by: James Smith <jamessmithsmusic@gmail.com>
This commit add changes to allow blank value for namespace, which
removes namespace field from CRD definition file.
Also updated year for the copyright.
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit adds new subcommand `generate` faas-cli which can be used to
generate YAML file definition for Kubernetes CRD.
Output of this command can be piped to `kubectl` to apply to
Kubernetes cluster.
Usage: `faas-cli generate --api=openfaas.com/v1alpha2 --yaml fn-1.yml |
kubectl apply -f -`
Fixes: #426
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
- Adds --tag=SHA option for build/push/deploy
- Corrects behaviour "tag" was not being honoured from the Docker
tag within the YAML file
- Did not work at all, had major blocking bug causing build to
fail to work by adding -t twice
- Wrote unit tests for new behaviour extracting new methods
- Introduced mode SHA / default and branch - branch-mode is yet to
be implemented
- Added final Docker image name to status updates in build command
- Tested with samples from faas-cli repo using --tag=SHA on/off
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Adds new command to seal a secret for use in OpenFaaS Cloud with
new subcommand "cloud". A sealed secret can be pushed into a
public Git repo without others being able to decrypt it.
The `kubeseal` CLI provides the implementation of the sealing
via exec - this is much less code and bloat than vendoring since
the kubeseal client API includes the Kubernetes Go client.
Command tested with SealedSecrets running on Kubernetes with
kubeadm and the faas-cli running on MacOS.
See README.md for usage and more instructions.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>