Add Rio to faas-cli generate #640
The following should generate a Rancher Rio Service definition:
faas-cli generate --api=services.rio.cattle.io
apiVersion: rio.cattle.io/v1 kind: Service metadata: name: figlet namespace: default spec: concurrency: 10 cpus: "0" env: - name: a value: b image: functions/figlet:latest imagePullPolicy: IfNotPresent maxScale: 1 minScale: 1 ports: - port: 8080 protocol: HTTP targetPort: 8080 rollout: true rolloutIncrement: 5 rolloutInterval: 5 scale: 1 weight: 100
We have OpenFaaS CRD and Knative Serving CRD in place. I'd like to see the Rio CRD there next.
Copy the approach used for the current generation as per: https://github.com/openfaas/faas-cli/blob/master/commands/generate.go#L164
Set all default / minimum needed to get a service running.
I'm quite keen to get this done quickly. Once you've had a look please can you reply if you can work on it and when you think that you may have a PR up?
The port is always fixed as: 8080
We have ways to translate the OpenFaaS scaling parameters but I am OK with just replicating the above YAML 1:1 with all the defaults for the first iteration then, we can improve on that. Secrets are also not needed for this PR.