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

Update zarf-managed secrets in all namespaces on a reinit #1898

Merged
merged 61 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
94c92e1
Update zarf-managed secrets in all namespaces on a reinit
Racer159 Jul 11, 2023
cc7d8c5
Fix git pull secret creation
Racer159 Jul 11, 2023
1d4b2ff
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Jul 11, 2023
8876a96
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Jul 13, 2023
7fcde6c
Add replicaCount and accessMode to the gitea chart
Racer159 Jul 13, 2023
f689e87
Add a test for the registry/git secrets
Racer159 Jul 13, 2023
3c0e24b
Initial layout of update-creds command
Racer159 Jul 13, 2023
3dd0689
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Jul 13, 2023
f19967f
Fix the viper location and clarify language
Racer159 Jul 13, 2023
2bda18a
Fix viper for vendored commands and make docs
Racer159 Jul 13, 2023
a1524f2
Fix viper for vendored commands and make docs
Racer159 Jul 13, 2023
3a53f1d
Initial UX for the update-creds command
Racer159 Jul 14, 2023
4b02d3e
Refactor credentials and add warnings when reiniting with different v…
Racer159 Jul 16, 2023
03ba2fd
More progress - fix upgrade test
Racer159 Jul 16, 2023
91168b6
Check both the namespace and secret labels
Racer159 Jul 16, 2023
54ef8b9
Cleanup and lint
Racer159 Jul 16, 2023
1c452e0
End to end worky for registry
Racer159 Jul 17, 2023
b8b1af0
Functional update-creds command
Racer159 Jul 19, 2023
c0d4561
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Jul 19, 2023
ac80077
Update the state befroe printing creds to capture things like the art…
Racer159 Jul 19, 2023
89457ba
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Jul 20, 2023
6e50238
Address linting issues with viper
Racer159 Jul 25, 2023
12181dd
Merge main
Racer159 Aug 3, 2023
eee9864
Lint
Racer159 Aug 3, 2023
4bc6ff6
Lint #2
Racer159 Aug 3, 2023
c981173
Initial test structure
Racer159 Aug 7, 2023
e9b99a9
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 7, 2023
ad49fe0
Remove the ability to update the logging chart
Racer159 Aug 7, 2023
e726efa
Test that the credentials allow authentication to git
Racer159 Aug 7, 2023
48e8d88
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 7, 2023
3355338
Fix upgrade test and docs
Racer159 Aug 7, 2023
1a63644
Ensure that the secret updates are tracked
Racer159 Aug 7, 2023
439be87
Refactor logic out of the zarf tools command
Racer159 Aug 7, 2023
7652573
Add detection of internal vs external
Racer159 Aug 7, 2023
0c43918
Fix bugs
Racer159 Aug 7, 2023
51d6318
Reduce race condition chances in common test
Racer159 Aug 7, 2023
f45a3f3
Address linting
Racer159 Aug 7, 2023
c134640
Add pod anti affinity to make them go onto different nodes if RWX
Racer159 Aug 8, 2023
4b92034
Move setup to common and standardive tools vs root behavior
Racer159 Aug 8, 2023
d51568f
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 8, 2023
10a83cb
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 8, 2023
6960419
Fix linting
Racer159 Aug 8, 2023
cadfc6c
Merge branch 'main' into 1715-update-secrets-across-namespaces
cmwylie19 Aug 8, 2023
d917d6c
Feedback from Rex
Racer159 Aug 9, 2023
e42b4c4
Switch to the new Defense Unicorns Azure DevOps account
Racer159 Aug 9, 2023
d354de1
Merge branch 'main' into 1715-update-secrets-across-namespaces
cmwylie19 Aug 9, 2023
fde893a
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 10, 2023
de91035
Update deprecation warnings to v1.0.0
Racer159 Aug 10, 2023
f2daf52
Fix git test
Racer159 Aug 10, 2023
c0aa22c
Remove sget flag from the config file test
Racer159 Aug 10, 2023
5a9ff30
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 10, 2023
e1ff2e5
Merge branch 'main' into 1715-update-secrets-across-namespaces
Noxsios Aug 11, 2023
7bc15a5
Update src/cmd/common/viper.go
Racer159 Aug 12, 2023
257ca9d
Fix feedback
Racer159 Aug 12, 2023
3449adf
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 12, 2023
6a5c3b4
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 14, 2023
5f5d702
Remove chown comment
Racer159 Aug 14, 2023
1185eb4
Small cleanup
Racer159 Aug 14, 2023
6a389c0
Merge branch 'main' into 1715-update-secrets-across-namespaces
Racer159 Aug 15, 2023
b614805
move zarf logging username to config
Racer159 Aug 15, 2023
95979a9
move zarf logging username to config
Racer159 Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/gitea/gitea-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ persistence:
storageClass: "###ZARF_STORAGE_CLASS###"
existingClaim: "###ZARF_VAR_GIT_SERVER_EXISTING_PVC###"
size: "###ZARF_VAR_GIT_SERVER_PVC_SIZE###"
accessModes:
- "###ZARF_VAR_GIT_SERVER_PVC_ACCESS_MODE###"

replicaCount: "###ZARF_VAR_GIT_SERVER_REPLICA_COUNT###"

gitea:
admin:
Expand Down
10 changes: 9 additions & 1 deletion packages/gitea/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ variables:
default: ""

- name: GIT_SERVER_PVC_SIZE
description: The size of the persistent volume claim for git server
description: The size of the persistent volume claim for the git server
default: 10Gi

- name: GIT_SERVER_PVC_ACCESS_MODE
description: The access mode of the persistent volume claim for the git server
default: ReadWriteOnce

- name: GIT_SERVER_CPU_REQ
description: The CPU request for git server
default: 200m
Expand All @@ -27,6 +31,10 @@ variables:
description: The memory limit for git server
default: 2Gi

- name: GIT_SERVER_REPLICA_COUNT
description: The number of git server replicas to deploy
default: "1"

components:
- name: git-server
description: |
Expand Down
17 changes: 1 addition & 16 deletions src/cmd/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,10 @@ func init() {

rootCmd.AddCommand(initCmd)

// Init package variables
// Init package variable defaults that are non-zero values
v.SetDefault(V_PKG_DEPLOY_SET, map[string]string{})

v.SetDefault(V_INIT_COMPONENTS, "")
v.SetDefault(V_INIT_STORAGE_CLASS, "")

v.SetDefault(V_INIT_GIT_URL, "")
v.SetDefault(V_INIT_GIT_PUSH_USER, config.ZarfGitPushUser)
v.SetDefault(V_INIT_GIT_PUSH_PASS, "")
v.SetDefault(V_INIT_GIT_PULL_USER, "")
v.SetDefault(V_INIT_GIT_PULL_PASS, "")

v.SetDefault(V_INIT_REGISTRY_URL, "")
v.SetDefault(V_INIT_REGISTRY_NODEPORT, 0)
v.SetDefault(V_INIT_REGISTRY_SECRET, "")
v.SetDefault(V_INIT_REGISTRY_PUSH_USER, config.ZarfRegistryPushUser)
v.SetDefault(V_INIT_REGISTRY_PUSH_PASS, "")
v.SetDefault(V_INIT_REGISTRY_PULL_USER, "")
v.SetDefault(V_INIT_REGISTRY_PULL_PASS, "")

// Init package set variable flags
initCmd.Flags().StringToStringVar(&pkgConfig.DeployOpts.SetVariables, "set", v.GetStringMapString(V_PKG_DEPLOY_SET), lang.CmdInitFlagSet)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Execute() {

func init() {
// Add the tools commands
tools.Include(rootCmd)
tools.Include(rootCmd, v)

// Skip for vendor-only commands
if tools.CheckVendorOnlyFromArgs() {
Expand Down
9 changes: 8 additions & 1 deletion src/cmd/tools/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/utils/exec"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var vendorCmds = []string{
Expand All @@ -31,6 +32,11 @@ var vendorCmds = []string{
"r",
}

var (
// Viper instance used by the tools package (shared with cmd)
v *viper.Viper
)

var toolsCmd = &cobra.Command{
Use: "tools",
Aliases: []string{"t"},
Expand All @@ -42,8 +48,9 @@ var toolsCmd = &cobra.Command{
}

// Include adds the tools command to the root command.
func Include(rootCmd *cobra.Command) {
func Include(rootCmd *cobra.Command, cmdViper *viper.Viper) {
rootCmd.AddCommand(toolsCmd)
v = cmdViper
}

// CheckVendorOnlyFromArgs checks if the command being run is a vendor-only command
Expand Down
Loading