-
Notifications
You must be signed in to change notification settings - Fork 3
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
test(render): add integration tests to check rendering output #118
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
36aaf71
chore: include rendered example in repository
kbudde e409287
test(render): add integration tests to check rendering output
kbudde 7e6efcb
docs: renamed main example to default. Added some readme
kbudde a839a40
fix: ignore temporary files created by "go test ./..."
kbudde cc83289
test: new test where rendered output is deleted before render
kbudde aa280db
fix: rerended default examples
kbudde 300c8b3
fix: add only folders to repository list for integration test
kbudde 424a3b4
Merge branch 'dev' into testable-examples
Zebradil 39571b0
cI(integration_test): set fixed values in examples for ci pipeline
kbudde 2902896
docs(examples): updated yaml fragment needed for examples
kbudde 77d7250
Merge branch 'dev' into testable-examples
Zebradil 6969d55
Apply suggestions from code review
Zebradil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/.myks/tmp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# Sets the number of applications to be processed in parallel. | ||
# The default (0) is no limit. | ||
async: 0 | ||
# One of the zerolog log levels. | ||
# See: https://github.com/rs/zerolog#leveled-logging | ||
log-level: info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/.myks/tmp/ |
12 changes: 12 additions & 0 deletions
12
examples/default/envs/_env/argocd/annotations.overlay.ytt.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#@ load("@ytt:overlay", "overlay") | ||
#@ load("@ytt:data", "data") | ||
|
||
#! Match all ArgoCD resources: Application, AppProject, Secret. | ||
#@overlay/match by=overlay.all, expects="1+" | ||
--- | ||
#@overlay/match missing_ok=True | ||
#@overlay/match-child-defaults missing_ok=True | ||
metadata: | ||
annotations: | ||
myks.dev/environment: #@ data.values.environment.id | ||
app.kubernetes.io/source: #@ data.values.myks.gitRepoUrl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#@ load("@ytt:overlay", "overlay") | ||
--- | ||
#@ def secret_fragment(): | ||
kind: Secret | ||
metadata: | ||
labels: | ||
argocd.argoproj.io/secret-type: cluster | ||
#@ end | ||
|
||
#@overlay/match by=overlay.subset(secret_fragment()), expects="0+" | ||
--- | ||
#! See https://argo-cd.readthedocs.io/en/release-2.8/operator-manual/declarative-setup/#clusters | ||
stringData: | ||
config: ARGOCD_CLUSTER_CONNECT_CONFIG | ||
server: ARGOCD_CLUSTER_SERVER_URL |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#! This file contains YTT overlays for common modifications to Kubernetes resources. | ||
|
||
#@ load("@ytt:data", "data") | ||
#@ load("@ytt:overlay", "overlay") | ||
|
||
#! Add common labels and annotations to all resources. | ||
#! ------------------------------------------------------------ | ||
#@overlay/match by=lambda i, l, r: "metadata" in l, when="1+" | ||
--- | ||
#@overlay/match-child-defaults missing_ok=True | ||
metadata: | ||
#! See https://ambassadorlabs.github.io/k8s-for-humans/ | ||
annotations: | ||
a8r.io/repository: #@ data.values.myks.gitRepoUrl | ||
#! More examples: | ||
#! a8r.io/owner: https://github.com/mykso | ||
#! a8r.io/chat: #@ data.values.application.chat |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! This is an example of a data values file for the root environment. | ||
#! All nested environments inherit these values. The values can be overridden in nested environments. | ||
#! This file is a good place to define default values for all environments. | ||
#! | ||
#! To change the schema of the data values, use `data/values-schema` annotation instead of `data/values`. | ||
#! Refer to the documentation of ytt overlays and data values for more information. | ||
|
||
#@data/values | ||
--- | ||
argocd: | ||
namespace: system-argocd | ||
app: | ||
prefix: app- | ||
#! Disable finalizers to preserve resources after deleting the ArgoCD application. | ||
finalizers: [] | ||
source: | ||
plugin: | ||
name: argocd-vault-plugin-v1.0.0 | ||
#! Fixed config to run tests successfull in pipeline | ||
targetRevision: main | ||
repoURL: [email protected]:mykso/myks.git | ||
project: | ||
prefix: env- | ||
|
||
#! Fixed git config to run tests successfull in pipeline. | ||
myks: | ||
gitRepoBranch: "main" | ||
gitRepoUrl: "[email protected]:mykso/myks.git" |
11 changes: 11 additions & 0 deletions
11
examples/default/envs/mykso/dev/_apps/argocd/.myks/vendir.lock.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: vendir.k14s.io/v1alpha1 | ||
directories: | ||
- contents: | ||
- git: | ||
commitTitle: Bump version to 2.7.3 (#13719)... | ||
sha: e7891b899a35dca06ae94965ea5ae2a86b344848 | ||
tags: | ||
- v2.7.3 | ||
path: . | ||
path: ytt/argocd | ||
kind: LockConfig |
1 change: 1 addition & 0 deletions
1
examples/default/envs/mykso/dev/_apps/argocd/.myks/vendir.sync.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ytt/argocd: c9846652945082356eb1bde564cd69e4c2162b49b698ffc04a5225d93d532f69 |
12 changes: 12 additions & 0 deletions
12
examples/default/envs/mykso/dev/_apps/argocd/.myks/vendir.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: vendir.k14s.io/v1alpha1 | ||
kind: Config | ||
directories: | ||
- path: ytt/argocd | ||
contents: | ||
- path: . | ||
git: | ||
url: https://github.com/argoproj/argo-cd | ||
ref: v2.7.3 | ||
includePaths: | ||
- manifests/ha/install.yaml | ||
newRootPath: manifests/ha |
5 changes: 5 additions & 0 deletions
5
examples/default/envs/mykso/dev/_apps/argocd/app-data.ytt.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#@data/values-schema | ||
--- | ||
#@overlay/match-child-defaults missing_ok=True | ||
application: | ||
gcpServiceAccountEmail: [email protected] |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Is it leftovers after debugging?
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.
I'll remove it and merge.