-
Notifications
You must be signed in to change notification settings - Fork 65
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
Create default passwords when dev mode is set. #441 #442
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
3a974cb
WIP. Create default passwords when dev mode is set. #441
cmoulliard a9c683f
Set the devMode to BuildCustomization
cmoulliard 6d85851
Pass the proper object containing devMode to the function populating …
cmoulliard 8dedc1e
Adding the code to patch the argocd-secret to use the hashed password…
cmoulliard 704bc78
Use cost 0 as argocd code #441
cmoulliard ee9dc06
Re-creating too the inital admin secret for argocd. #441
cmoulliard d392287
Move the current time function. Generate the missing field. #441
cmoulliard 0c62564
Include needed argocd k8s resources and change the code to set the de…
cmoulliard 1e1b980
Fix wrong key as account should be accounts
cmoulliard 3d884da
Change the gitea user from giteaAdmin to developer for a user's devel…
cmoulliard f31a08e
Reverting to giteaAdmin till we know why a different user - developer…
cmoulliard c355ba1
Change the number from 58 to 59 as we install a new ConfigMap - RBAC …
cmoulliard 8158551
Remove from the util go file the setupLog and replace it with fmt.Err…
cmoulliard 78e1e40
Removed non used argocd constants
cmoulliard 7d81b27
Use r.client instead of k8s.GetKubeClient()
cmoulliard a8c3016
Rename the flag from dev to dev-mode
cmoulliard 80a785b
Use an unstructured object to avoid managing fields we do not care ab…
cmoulliard 3c3511d
Include the developer username and password to the command get secret
cmoulliard bf8e2cc
Refactor the code to update the argocd password post reconciliation. …
cmoulliard f76db50
Refactor the code to update the gitea password post reconciliation. #441
cmoulliard 86b26a2
Change the logging level from info to debug
cmoulliard 35fc902
Rename devMode, dev-mode to staticPasswords and static-passwords. Fix…
cmoulliard e4c78de
Remove else block not needed when we verify if the password changed
cmoulliard 700a841
Improve the code and remove the non needed return statement
cmoulliard 5830b22
Improve code and variables
cmoulliard d1ed81a
Remove non used functions
cmoulliard f0754f7
Created a new util package for gitea and moved there: const and funct…
cmoulliard 3ab4fd3
Move GiteaBaseUrl to the util package of gitea
cmoulliard c8ac946
Fix error r.r.GiteaBaseUrl => util.r.GiteaBaseUrl
cmoulliard e02a5d2
Refactor the code to also patch the secret's password of gitea and ar…
cmoulliard f67a91c
Regenerate the token for gitea
cmoulliard dbf56c2
Fix wrong call to the function: GetGiteaToken
cmoulliard d029f62
Reverting the change to use as user arg: dev-mode instead of staticPa…
cmoulliard 570ca30
Define an util const: StaticPassword
cmoulliard 2fe31a3
Move the function ArgocdInitialAdminSecretObject() to the argocd.go f…
cmoulliard e4831cd
Rename functions. Remove the var about status and change the signatur…
cmoulliard 1cd1773
Remove devMode as not used
cmoulliard 70e3d37
Rename dev-mode to dev-password
cmoulliard 45c7a90
Merge branch 'main' into dev-mode
cmoulliard 6c183d1
Import missing package needed: util
cmoulliard 06fd823
Use singular instead of plural
cmoulliard 5a17562
Merge branch 'main' into dev-mode
cmoulliard bc2aa2e
Fix wrong import indentation
cmoulliard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: argocd-rbac-cm | ||
app.kubernetes.io/part-of: argocd | ||
name: argocd-rbac-cm | ||
namespace: argocd | ||
data: | ||
policy.csv: | | ||
p, role:developer, applications, *, *, allow | ||
g, developer, role:developer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of having a separate account that has a very similar permissions as admin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an account for the developers and it only allows to handle applications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me if this is inline with what you are thinking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option 2 => Use a known password for the developer and admin account if the dev password flag is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that sounds good to me. Looks like Gitea static password isn't working for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For gitea when using dev-mode, we should still use as user: giteaAdmin and password = developer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are adding a user called developer to argocd, we may as well add the developer user in Gitea.