Skip to content

Commit

Permalink
add logic to handle eso in akamai (#317)
Browse files Browse the repository at this point in the history
* add logic to handle eso in akamai

* update secret key
  • Loading branch information
jarededwards authored Mar 13, 2024
1 parent dc97b62 commit 7cef871
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 13 additions & 0 deletions internal/controller/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,19 @@ func (clctrl *ClusterController) WriteVaultSecrets() error {
}
vaultClient.SetToken(vaultRootToken)

if clctrl.CloudProvider == "akamai" {
secretToCreate := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "vault-secrets",
Namespace: "external-secrets-operator",
},
Data: map[string][]byte{
"vault-token": []byte(vaultRootToken),
},
}
k8s.CreateSecretV2(kcfg.Clientset, secretToCreate)
}

_, err = vaultClient.KVv2("secret").Put(context.Background(), "external-dns", map[string]interface{}{
"token": externalDnsToken,
})
Expand Down
2 changes: 0 additions & 2 deletions providers/akamai/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ func CreateAkamaiCluster(definition *pkgtypes.ClusterDefinition) error {
return err
}

// Needs wait after cluster create

err = ctrl.ClusterSecretsBootstrap()
if err != nil {
ctrl.HandleError(err.Error())
Expand Down

0 comments on commit 7cef871

Please sign in to comment.