Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitops-getting-started
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kubernetes
automation
releases
gitops-getting-started
Commits
6de380e1
Commit
6de380e1
authored
5 years ago
by
Ricardo Rocha
Browse files
Options
Downloads
Patches
Plain Diff
Improve documentation regarding secret handling
parent
1487ac56
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+26
-10
26 additions, 10 deletions
README.md
with
26 additions
and
10 deletions
README.md
+
26
−
10
View file @
6de380e1
...
...
@@ -51,25 +51,41 @@ The structure of this repo is as follows:
## Secrets
We recommend using the
[
helm secrets
](
https://gitlab.cern.ch/helm/plugins/barbican
)
plugin to encrypt the files under the
*secrets*
directory.
This does not about handling Kubernetes Secret resources, that's handled by the
different helm charts. This is a solution to handle sensitive information
stored in the helm yaml files (that often populates the Kubernetes Secrets).
As Flux does not understand this encryption method, we need to create these
secrets in advance, following something like:
The sensitive yaml content should be stored in a separate Secret object to be
created explicitly, previously to deploying Flux. We recommend using the
[
barbican secrets
](
https://gitlab.cern.ch/helm/plugins/barbican
)
plugin to encrypt
the files under the
*secrets*
directory.
You'll need to source the project that should hold the encryption key.
```
bash
export
OS_TOKEN
=
$(
openstack token issue
-c
id
-f
value
)
```
And then edit and create the resources:
```
bash
kubectl create namespace prod
kubectl create namespace stg
kubectl create
-f
namespaces/prod.yaml
kubectl create
-f
namespaces/stg.yaml
helm secrets edit secrets/prod/secrets.yaml
helm secrets edit secrets/stg/secrets.yaml
kubectl cre
ate
-f
secrets/prod/secrets.yaml
kubectl cre
ate
-f
secrets/stg/secrets.yaml
kubectl
se
cre
ts apply
-f
secrets/prod/secrets.yaml
kubectl
se
cre
ts apply
-f
secrets/stg/secrets.yaml
```
Remember that these resources are not managed by Flux. If you need to update
any part of the sensitive values yaml data, you need to update them manually
by doing:
```
kubectl apply -f secrets/prod/secrets.yaml
kubectl apply -f secrets/stg/secrets.yaml
helm secrets edit secrets/prod/secrets.yaml
helm secrets edit secrets/stg/secrets.yaml
kubectl secrets apply -f secrets/prod/secrets.yaml
kubectl secrets apply -f secrets/stg/secrets.yaml
```
In the near future there will be better integration of this way of handling
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment