Serverless/Kubernetes GitLab CLI enhancements
Extracted from https://gitlab.com/gitlab-org/gitlab-ce/issues/58058 when the issue was split.
We have a CLI we use for building Serverless functions into docker images and deploying to Knative. We may wish to consider expanding this with some more use cases related to K8s integration and Knative function management.
Additionally, there is a gap between all these tools that we need to use to create a cluster in GKE and integrate this cluster with GitLab; the CLI could be used to bridge this gap.
# Set GitLab project
$ glkube set project my/gitlab/project
# Add existing cluster to GitLab
$ glkube cluster add my-cluster
# Add existing cluster to GitLab to a different project
$ glkube cluster add my-cluster --project my/gitlab/project
# Get all GitLab-managed apps
$ glkube get apps
# Install Knative in the integrated cluster
$ glkube install knative
# Trigger a function - a simple way
$ glkube trigger echo --hello
# Trigger a function without defaults
$ glkube --project my/project --cluster my-knative trigger echo --arg --param 1
# Get more details about functions
$ glkube get functions
# Get more details about echo function
$ glkube describe function echo
Edited by 🤖 GitLab Bot 🤖