openfaas / openfaas/faas-cli

Support for contexts or profiles for remote gateways

Open
#496 12 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design/review enhancement help wanted skill/intermediate
Dominant language
Go
Stars
816
Forks
230
Avg merge
6h 4m
Merged PRs (30d)
1

Description

We could offer a way to support a profile or context as an alias for a gateway. A user suggested something similar about an "rc" file or not having to remember multiple gateway URLs in #479

Current behaviour

You need to remember your gateway URLs or look them up in ~/.openfaas/config.yaml

Feature

This might be similar to how kubectl handles multiple contexts.

# faas-cli create-context staging --gateway https://staging.openfaas.com

# faas-cli set-context staging
Using gateway: https://staging.openfaas.com

# faas-cli get-context staging
Using gateway: https://staging.openfaas.com

# faas-cli get-context

[x] staging
[ ] local
[ ] swarm

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the gateway settings in ~/.openfaas/config.yaml and the existing faas-cli gateway entry points. Define how contexts are stored, selected, listed, and reported, using the proposed create-context, set-context, and get-context commands as the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.