Skip to content

Commit

Permalink
Merge pull request #2 from wenchajun/file
Browse files Browse the repository at this point in the history
change ca path
  • Loading branch information
benjaminhuo authored Mar 12, 2024
2 parents e131567 + 7a866e2 commit 8fbcb1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion internal/constants/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const (
CertificationLabel = "logging.whizard.io/certification"
ConfigReloadEnabled = "logging.whizard.io/enable"
GeneratedFiles = "generated-files"
Config = "config"
Certification = "certification"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/controller/secret_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (r *SecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
return ctrl.Result{}, err
}

configpath := fmt.Sprintf("%s/%s", constants.FileDir, constants.Config)
configpath := fmt.Sprintf("%s", constants.FileDir)
err = os.MkdirAll(configpath, 0755)
if err != nil {
fmt.Println("Error creating directory:", err)
Expand All @@ -101,7 +101,7 @@ func (r *SecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr

for _, cs := range configsecrets.Items {
for s, bytes := range cs.Data {
path := fmt.Sprintf("%s/%s/%s-%s", constants.FileDir, constants.Config, cs.Name, s)
path := fmt.Sprintf("%s/%s-%s", constants.FileDir, cs.Name, s)
err = os.WriteFile(path, bytes, 0644)
if err != nil {
return ctrl.Result{}, err
Expand Down

0 comments on commit 8fbcb1d

Please sign in to comment.