-
Notifications
You must be signed in to change notification settings - Fork 46
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
Vault and External Secrets Operator integration #98
Merged
Conversation
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
- Rename project "monitoring" to more generic "system" - Move apps in "system" project to common folder in applications Avoid a bigger mess before adding ESO and vault operators to project.
In control-app and in repo. Prepares for more subfolders for ESO and vault, where there will be more sub folders/applications. webconfig-cm.yaml seems not to be needed.
- Simplify package structure - Rename module to feature - Rename metrics to argocd (because without the metrics module, the control-app repo would be empty!) - Make features tell if they are enabled or disabled. - Provide option for disabling features - Remove unnecessary classes: - Exception (we only need a simple error message here!) - ModuleRepository: What was it's purpose? Now part of Application - ApplicationTest: What did it test anyway? Log messages?!
Install via Helm directly (not ArgoCD), because - Difficult to implement apply of secret-store.yaml -> separate repo necessary? - This way ESO can be used with all operators, not only argoCD
E.g. when playground is applied a 2nd time, #idempotence
As part of the control app
Advantage: * Can be used from all GitOps operators in playground * Uniform way, sam method of deployment as for Jenkins, SCMM, Registry, External Secrets, Vault
Mainly to store e.g. helm chart version in single place. But also this allows for reading configuration from a file in the future. Introduce more generic terms monitoring and secrets in internal config. Can't ue application.yml, because it will not be bundled into static image.
E.g. when playground is applied a 2nd time, #idempotence Also extends command executor to also return stderr and exit code. Allow for suppressing failure. This was done because a different implementation for areChangesStagedForCommit() would be: "git update-index --refresh && git diff-index --exit-code HEAD --" which return exit code 1. A requirement such as ignoring failing commands might come back in the future so let's keep it.
- Install chart - Create Token secrets for secretStores
- Create external secrets - Integrate secret into example - Move example app repo creation from apply.sh to groovy - Make repo code init testable - Add missing ArgoCD.groovy tests -> Fail "GitClient" is stateful. Needs refactoring
4.2.9 is no longer working (even with default values) because of plugin dependency "Plugin workflow-aggregator ... depends on configuration-as-code:1559.v38a_b_2e3b_6b_b_7, but there is an older version defined on the top level"
The constructor now tells us, that it's bound to a repo and we need to use multiple instances for multiple repos.
This reflects more clearly what it is: It is not a client, it is a single repo (including the client) and has SCMM-specifics.
Newer versions of SCMM use "main" by default. We might want to bring this back when we migrate the SCMM API calls from bash to groovy. Or we use the SCMM client, or native Groovy HTTP methods.
Never finished syncing in argocd, because service remained on type LB, where no external IP can be received on local cluster.
Timing problem: Hook is executed before Vault HTTP is up. This leads to the hook failing, which leads to the pod restarting. Eventually we have a crash loop backoff. Solution: Wait for HTTP to become ready.
Staging app was missing, was pushed to wrong path in gitops repo.
External Secrets Operator seems to fail on properties containing minus, such as: property: nginx-secret
Group by repo. Easier to maintain, because there are a number of other repos waiting to be migrated from apply.sh
Avoid errors such as: Error: Service "vault-ui" is invalid: spec.ports[0].nodePort: Invalid value: 8200: provided port is not in the valid range. The range of valid ports is 30000-32767
So we hopefully can keep better track of what needs to be kept uptodate
Latest versions finally fix Jenkins builds on k8s nodes no longer work
🤷♂️ Exception in thread "main" com.oracle.svm.core.jdk.UnsupportedFeatureError: Runtime reflection is not supported for public abstract java.util.Iterator java.util.List.iterator() at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) at java.lang.reflect.Method.acquireMethodAccessor(Method.java:77) at java.lang.reflect.Method.invoke(Method.java:566) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:1017) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1008) at org.codehaus.groovy.runtime.InvokerHelper.asIterator(InvokerHelper.java:609) at org.codehaus.groovy.runtime.DefaultGroovyMethods.removeAll(DefaultGroovyMethods.java:5171) at com.cloudogu.gitops.features.argocd.ArgoCD.removeObjectFromList(ArgoCD.groovy:117)
Because SCMM and Jenkins won't work without the fixes from this branch.
Bitnami removes all versions older than 6 months from their helm chart index. bitnami/charts#10833 To make sure we're not forced to update again, switch to full index.
# Conflicts: # scripts/jenkins/init-jenkins.sh
schnatterer
force-pushed
the
feature/vault
branch
from
January 11, 2023 15:00
26e6ffb
to
1dbe375
Compare
|
schnatterer
force-pushed
the
feature/vault
branch
2 times, most recently
from
January 16, 2023 15:33
1a3dbf8
to
46fabee
Compare
* For one this allows arbitrary `--password`s. As the `root` token is also used as an ID, having special character in `--password` resulted in `Error initializing Dev mode: failed to create root token with ID "<PW with special chars>"`. * Not using the root token is much closer to production! * If necessary, the root token can be found on the vault-0 pod log
And increased timeout. Hopefully builds will be less flaky in the future
schnatterer
force-pushed
the
feature/vault
branch
from
January 16, 2023 16:29
46fabee
to
159954b
Compare
Closed
schnatterer
force-pushed
the
feature/vault
branch
from
January 17, 2023 16:51
e2baf6d
to
a61b5aa
Compare
schnatterer
force-pushed
the
feature/vault
branch
2 times, most recently
from
January 18, 2023 08:14
a4afdbc
to
06ef921
Compare
schnatterer
force-pushed
the
feature/vault
branch
from
January 18, 2023 08:22
06ef921
to
42a48d9
Compare
transfer vault values.yaml into groovy class Signed-off-by: pmarkiewka <philipp.markiewka@cloudogu.com>
schnatterer
commented
Jan 25, 2023
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.
Did it just work without namespaceOverride
?
…lib#23 cloudogu/gitops-build-lib#23 Signed-off-by: pmarkiewka <philipp.markiewka@cloudogu.com>
Signed-off-by: pmarkiewka <philipp.markiewka@cloudogu.com>
Signed-off-by: pmarkiewka <philipp.markiewka@cloudogu.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
--vault=dev|prod
parameter.SecretStores
to ArgoCD andExternalSecrets
to an example app (ArgoCD-only)Note that the diagrams in README won't show until merged to master (because we use the plantuml proxy for rendering)
Can be tested with preview image:
ghcr.io/cloudogu/gitops-playground:159954b
In order to implment this feature properly, some major refactorings needed to be done:
modules
were renamed tofeatures
to better reflect what they are to the GitOps playgrounds, e.g. monitoring and secrets managements are optional featuresApplicationConfigurator
-> this holds a lot of constants that could be overwritten easily using a config file, no need to add dozens of CLI params.set -o errexit
. This lead to a couple of improvments for idempotence. e.g. where something failed in the past but was never recognized. Example: git push of control app.ScmmRepo
to better match what it is. A representation of a repostitory in SCMM, not a generic clientMinor unrelated fixes