armada icon indicating copy to clipboard operation
armada copied to clipboard

Support e2e armada server auth configs as env variable options

Open Sharpz7 opened this issue 2 years ago • 7 comments

There are limited ways that auth will be setup for armada for CI and Development. These should be supported as an env var for the armada server component.

For example, ARMADA_CONFIG_AUTH="insecure" this config would automatically be injected https://github.com/armadaproject/armada/blob/master/e2e/setup/insecure-armada-auth-config.yaml

If the user has specified config, this would override this env var.

┆Issue is synchronized with this Jira Task by Unito

Sharpz7 avatar Mar 08 '23 20:03 Sharpz7

Hey @Sharpz7 👋🏼 Is this issue already worked on? if not then I would like to give it a try..

Parthiba-Hazra avatar Jul 18 '23 10:07 Parthiba-Hazra

Apologies for not getting back to you @Parthiba-Hazra. If you would like to work on this still feel free :))

Sharpz7 avatar Aug 21 '23 04:08 Sharpz7

@Sharpz7 yeah sure.. I will start to work on this.

Parthiba-Hazra avatar Aug 21 '23 07:08 Parthiba-Hazra

Hi @Sharpz7 I need help on this .. I am not so clear on this issue yet.. can you please confirm, I am on right track or not -

`ifeq ($(ARMADA_CONFIG_AUTH),insecure) DEFAULT_CONFIG_PATH := /e2e/setup/insecure-armada-auth-config.yaml else ifeq ($(ARMADA_CONFIG_AUTH),redis) DEFAULT_CONFIG_PATH := /e2e/setup/redis/armada-config.yaml else ifeq ($(ARMADA_CONFIG_AUTH),pulsar) DEFAULT_CONFIG_PATH := /e2e/setup/pulsar/armada-config.yaml else ifeq ($(ARMADA_CONFIG_AUTH),server) DEFAULT_CONFIG_PATH := /e2e/setup/server/armada-config.yaml else $(error Unsupported ARMADA_CONFIG_AUTH value: $(ARMADA_CONFIG_AUTH)) endif

rebuild-server: build-docker-server docker rm -f server || true

# Allow users to override the config path by specifying CONFIG_PATH as an environment variable
CONFIG_PATH := $(if $(CONFIG_PATH),$(CONFIG_PATH),$(DEFAULT_CONFIG_PATH))

docker run -d --name server --network=kind -p=50051:50051 -p 8080:8080 -v ${PWD}/e2e:/e2e \
	armada ./server --config $(CONFIG_PATH)

`

Parthiba-Hazra avatar Aug 22 '23 07:08 Parthiba-Hazra

Sorry, this is not quite it.

I would want an option from our mage localdev commands. Maybe you have a flag --auth=secure/insecure.

Make sure mage localdev full testsuite runs for you in full without errors first. That can be your backbone to test changes.

Sharpz7 avatar Aug 24 '23 17:08 Sharpz7

https://github.com/armadaproject/armada/pull/2882 Hopefully this PR helps

Sharpz7 avatar Aug 24 '23 17:08 Sharpz7

Ok got it! thanks for the clarification.

Parthiba-Hazra avatar Aug 25 '23 04:08 Parthiba-Hazra