Skip to content

Commit

Permalink
docker-compose update for local testing\n sync-deps.yaml config added…
Browse files Browse the repository at this point in the history
… for testing the new feature
  • Loading branch information
chrissgyulev committed Oct 22, 2022
1 parent a3c985f commit 3da9e2e
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 14 deletions.
39 changes: 28 additions & 11 deletions charts-syncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,49 @@ source:
# Kind specify the chart repository kind. Valid values are HELM, CHARTMUSEUM, and HARBOR
kind: HELM
# url is the url of the chart repository
url: https://prometheus-community.github.io/helm-charts # local test source repo
url: http://localhost:8080 # local test source repo
# auth is used if the source repository is protected with basic auth (Optional section)
# auth:
# # username is the username used to authenticate against the source chart repo
# # `SOURCE_AUTH_USERNAME` env var can be used instead of this entry
# username: "USERNAME"
# # password is the password used to authenticate against the source chart repo
# # `SOURCE_AUTH_PASSWORD` env var can be used instead of this entry
# password: "PASSWORD"
auth:
# username is the username used to authenticate against the source chart repo
# `SOURCE_AUTH_USERNAME` env var can be used instead of this entry
username: "USERNAME"
# password is the password used to authenticate against the source chart repo
# `SOURCE_AUTH_PASSWORD` env var can be used instead of this entry
password: "PASSWORD"
# Options for repositories of kind=OCI
# disableChartsIndex: false
# chartsIndex: my-oci-registry.io/my-project/my-custom-index:prod
# target includes relevant information about the target chart repository
target:
# In case there is a need to mirror dependencies (from trustedSourceDeps list, see above) - this must be set to true
replaceDependencyRepo: true
# repoName is used to modify the README of the chart. Default value: `myrepo`
repoName: myrepo
# containerRegistry is used to update the image registry section of the values.yaml file
# NOTE: If containerRegistry is not set (or not present), the registry sections won't be updated
containerRegistry: demo.registry.io
# containerRepository is used to update the image repository section of the values.yaml file
# NOTE: If containerRepository is not set (or not present), the repository sections won't be updated
containerRepository: tpizarro/demo
repo:
# Kind specify the chart repository kind. Valid values are HELM, CHARTMUSEUM, and HARBOR
kind: OCI
kind: CHARTMUSEUM
# url is the url of the chart repository
url: https://europe-west1-docker.pkg.dev/mm-platform-sre-prod/chriss-charts-syncer-dev-and-testing
url: http://localhost:9090 # local test target repo
# auth is used if the target repository is protected with basic auth (Optional section)
auth:
# username is the username used to authenticate against the target chart repo
# `TARGET_AUTH_USERNAME` env var can be used instead of this entry
username: "USERNAME"
# password is the password used to authenticate against the target chart repo
# `TARGET_AUTH_PASSWORD` env var can be used instead of this entry
password: "PASSWORD"
# charts is an OPTIONAL list to specify a subset of charts to be synchronized
# It is mandatory if the source repo is OCI and not autodiscovery is supported in that repository
# More info here https://github.com/bitnami-labs/charts-syncer#charts-index-for-oci-based-repositories
charts:
- kube-prometheus-stack
- redis
- etcd
# opt-out counterpart of "charts" property that explicit list the Helm charts to be skipped
# either "charts" or "skipCharts" can be used at once
# skipCharts:
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '3.1'

services:
charts-syncer:
build: .
restart: "always"
command: "sync --config /config/charts-syncer.yaml -v 4 --latest-version-only"
command: "sync --config /config/sync-deps.yaml -v 4 --latest-version-only"
# environment:
# - TARGET_AUTH_USERNAME=oauth2accesstoken
# - TARGET_AUTH_PASSWORD=
volumes:
- "./examples:/config"
- "./localrepo:/localrepo"
38 changes: 38 additions & 0 deletions examples/sync-deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Example config file
#

# source includes relevant information about the source chart repository
source:
# Dependencies located in repos from this list will be considered as trusted, and also synced.
# The entry format is the same as "repo" (see below)
trustedSourceDeps:
- kind: HELM
url: https://grafana.github.io/helm-charts
repo:
# Kind specify the chart repository kind. Valid values are HELM, CHARTMUSEUM, and HARBOR
kind: HELM
# url is the url of the chart repository
url: https://prometheus-community.github.io/helm-charts # local test source repo
# target includes relevant information about the target chart repository
target:
# In case there is a need to mirror dependencies (from trustedSourceDeps list, see above) - this must be set to true
replaceDependencyRepo: true
repo:
# Kind specify the chart repository kind. Valid values are HELM, CHARTMUSEUM, and HARBOR
kind: LOCAL
path: localrepo
# charts is an OPTIONAL list to specify a subset of charts to be synchronized
# It is mandatory if the source repo is OCI and not autodiscovery is supported in that repository
# More info here https://github.com/bitnami-labs/charts-syncer#charts-index-for-oci-based-repositories
charts:
- kube-prometheus-stack
# opt-out counterpart of "charts" property that explicit list the Helm charts to be skipped
# either "charts" or "skipCharts" can be used at once
# skipCharts:
# - mariadb

# Whether to also relocate the container images referenced by the Helm Chart
# Note that this requires the Helm Chart to be compatible with relok8s tool by containing a .relok8s-images.yaml file
# More info about the file here https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes#image-hints-file
relocateContainerImages: false

0 comments on commit 3da9e2e

Please sign in to comment.