Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix basic-auth on re-run to disable basic auth #223

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

Waterdrips
Copy link
Contributor

Description

Enable switching basic auth on/off on re-running arkade install

Fixes #8

This has been tested by running this build with basic auth on, then off.
Then on, then off. IT was enabled/disabled each time and port forwarding
to the gateway gave the correct auth enabled/disabled status depending on
how it was deployed.

Signed-off-by: Alistair Hey alistair@heyal.co.uk

Motivation and Context

How Has This Been Tested?

See description

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have tested this on arm, or have added code to prevent deployment

cmd/apps/openfaas_app.go Outdated Show resolved Hide resolved
directFunctions, _ := command.Flags().GetBool("direct-functions")
directFunctionsVal := "true"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that the behaviour replaced here is the same as before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fairly sure - the command printed to console

Command: /home/heyal/.arkade/bin/helm [upgrade --install openfaas openfaas/openfaas --namespace openfaas --wait --values /tmp/charts/openfaas/values.yaml --set openfaasImagePullPolicy=IfNotPresent --set faasnetes.imagePullPolicy=Always --set basicAuthPlugin.replicas=1 --set ingressOperator.create=false --set queueWorker.maxInflight=1 --set clusterRole=false --set gateway.directFunctions=true --set operator.create=false --set gateway.replicas=1 --set queueWorker.replicas=1 --set basic_auth=true --set serviceType=NodePort]

and the raw map printed

map[basicAuthPlugin.replicas:1 basic_auth:true clusterRole:false faasnetes.imagePullPolicy:Always gateway.directFunctions:true gateway.replicas:1 ingressOperator.create:false openfaasImagePullPolicy:IfNotPresent operator.create:false queueWorker.maxInflight:1 queueWorker.replicas:1 serviceType:NodePort]

Fixes #8

This has been tested by running this build with basic auth on, then off.
Then on, then off. IT was enabled/disabled each time and port forwarding
to the gateway gave the correct auth enabled/disabled status depending on
how it was deployed.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
@Waterdrips
Copy link
Contributor Author

requested changes implemented

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit 541be5b into alexellis:master Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

basic auth does not get disabled after enabling it first for openfaas app
2 participants