Skip to content

Add Rio to faas-cli generate #640

Open
@alexellis

Description

Expected Behaviour

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

Current Behaviour

We have OpenFaaS CRD and Knative Serving CRD in place. I'd like to see the Rio CRD there next.

Possible Solution

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.

  • Install K8s somewhere
  • Install Rio - https://github.com/rancher/rio
  • Try kubectl apply for the sample YAML above
  • Next update the faas-cli code to generate Service YAML

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions