chartmuseum

by stakater

Helm chartv1.8.0App 0.8.0Verified publisher

Helm Chart Repository with support for Amazon S3 and Google Cloud Storage

About this chart

ChartMuseum Helm Chart

Deploy your own private ChartMuseum.

Please also see https://github.com/kubernetes-helm/chartmuseum

Table of Content

  • Prerequisites
  • Configuration
  • Installation
    • Using with Amazon S3
      • permissions grant with access keys
      • permissions grant with IAM instance profile
      • permissions grant with IAM assumed role
    • Using with Google Cloud Storage
    • Using with Microsoft Azure Blob Storage
    • Using with Alibaba Cloud OSS Storage
    • Using with local filesystem storage
      • Example storage class
  • Uninstall

Prerequisites

  • Kubernetes with extensions/v1beta1 available
  • [If enabled] A persistent storage resource and RW access to it
  • [If enabled] Kubernetes StorageClass for dynamic provisioning

Configuration

By default this chart will not have persistent storage, and the API service will be DISABLED. This protects against unauthorized access to the API with default configuration values.

For a more robust solution supply helm install with a custom values.yaml You are also required to create the StorageClass resource ahead of time:

kubectl create -f /path/to/storage_class.yaml

The following table lists common configurable parameters of the chart and their default values. See values.yaml for all available options.

ParameterDescriptionDefault
image.pullPolicyContainer pull policyIfNotPresent
image.repositoryContainer image to usechartmuseum/chartmuseum
image.tagContainer image tag to deployv0.8.0
persistence.accessModeAccess mode to use for PVCReadWriteOnce
persistence.enabledWhether to use a PVC for persistent storagefalse
persistence.sizeAmount of space to claim for PVC8Gi
persistence.labelsAdditional labels for PVC{}
persistence.storageClassStorage Class to use for PVC-
persistence.volumeNameVolume to use for PVC``
persistence.pv.enabledWhether to use a PV for persistent storagefalse
persistence.pv.capacity.storageStorage size to use for PV8Gi
persistence.pv.accessModeAccess mode to use for PVReadWriteOnce
persistence.pv.nfs.serverNFS server for PV``
persistence.pv.nfs.pathStorage Path``
persistence.pv.pvnameCustom name for private volume``
replicaCountk8s replicas1
resources.limits.cpuContainer maximum CPU100m
resources.limits.memoryContainer maximum memory128Mi
resources.requests.cpuContainer requested CPU80m
resources.requests.memoryContainer requested memory64Mi
serviceAccount.createIf true, create the service accountfalse
serviceAccount.nameName of the serviceAccount to create or use{{ chartmuseum.fullname }}
securityContextMap of securityContext for the pod{}
nodeSelectorMap of node labels for pod assignment{}
tolerationsList of node taints to tolerate[]
affinityMap of node/pod affinities{}
env.open.STORAGEStorage Backend to uselocal
env.open.ALIBABA_BUCKETBucket to store charts in for Alibaba``
env.open.ALIBABA_PREFIXPrefix to store charts under for Alibaba``
env.open.ALIBABA_ENDPOINTAlternative Alibaba endpoint``
env.open.ALIBABA_SSEServer side encryption algorithm to use``
env.open.AMAZON_BUCKETBucket to store charts in for AWS``
env.open.AMAZON_ENDPOINTAlternative AWS endpoint``
env.open.AMAZON_PREFIXPrefix to store charts under for AWS``
env.open.AMAZON_REGIONRegion to use for bucket access for AWS``
env.open.AMAZON_SSEServer side encryption algorithm to use``
env.open.GOOGLE_BUCKETBucket to store charts in for GCP``
env.open.GOOGLE_PREFIXPrefix to store charts under for GCP``
env.open.STORAGE_MICROSOFT_CONTAINERContainer to store charts under for MS``
env.open.STORAGE_MICROSOFT_PREFIXPrefix to store charts under for MS``
env.open.STORAGE_OPENSTACK_CONTAINERContainer to store charts for openstack``
env.open.STORAGE_OPENSTACK_PREFIXPrefix to store charts for openstack``
env.open.STORAGE_OPENSTACK_REGIONRegion of openstack container``
env.open.STORAGE_OPENSTACK_CACERTPath to a CA cert bundle for openstack``
env.open.CHART_POST_FORM_FIELD_NAMEForm field to query for chart file content``
env.open.PROV_POST_FORM_FIELD_NAMEForm field to query for chart provenance``
env.open.DEPTHlevels of nested repos for multitenancy.0
env.open.DEBUGShow debug messagesfalse
env.open.LOG_JSONOutput structured logs in JSONtrue
env.open.DISABLE_STATEFILESDisable use of index-cache.yamlfalse
env.open.DISABLE_METRICSDisable Prometheus metricstrue
env.open.DISABLE_APIDisable all routes prefixed with /apitrue
env.open.ALLOW_OVERWRITEAllow chart versions to be re-uploadedfalse
env.open.CHART_URLAbsolute url for .tgzs in index.yaml``
env.open.AUTH_ANONYMOUS_GETAllow anon GET operations when auth is usedfalse
env.open.CONTEXT_PATHSet the base context path``
env.open.INDEX_LIMITParallel scan limit for the repo indexer``
env.open.CACHECache store, can be one of: redis``
env.open.CACHE_REDIS_ADDRAddress of Redis service (host:port)``
env.open.CACHE_REDIS_DBRedis database to be selected after connect0
env.fieldExpose pod information to containers through environment variables``
env.secret.BASIC_AUTH_USERUsername for basic HTTP authentication``
env.secret.BASIC_AUTH_PASSPassword for basic HTTP authentication``
env.secret.CACHE_REDIS_PASSWORDRedis requirepass server configuration``
gcp.secret.enabledFlag for the GCP service accountfalse
gcp.secret.nameSecret name for the GCP json file``
gcp.secret.keySecret key for te GCP json filecredentials.json
service.typeKubernetes Service typeClusterIP
service.clusterIPStatic clusterIP or None for headless servicesnil
service.servicenameCustom name for service``
service.labelsAdditional labels for service{}
deployment.labelsAdditional labels for deployment{}
deployment.matchlabesMatch labels for deployment selector{}

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Installation

helm install --name my-chartmuseum -f custom.yaml stable/chartmuseum

Using with Amazon S3

Make sure your environment is properly setup to access my-s3-bucket

You need at least the following permissions inside your IAM Policy

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowListObjects",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": "arn:aws:s3:::my-s3-bucket"
    },
    {
      "Sid": "AllowObjectsCRUD",
      "Effect": "Allow",
      "Action": [
        "s3:DeleteObject",
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-s3-bucket/*"
    }
  ]
}

You can grant it to chartmuseum by several ways:

permissions grant with access keys

Grant permissions to special user and us it's access keys for auth on aws

Specify custom.yaml with such values

env:
  open:
    STORAGE: amazon
    STORAGE_AMAZON_BUCKET: my-s3-bucket
    STORAGE_AMAZON_PREFIX:
    STORAGE_AMAZON_REGION: us-east-1
  secret:
    AWS_ACCESS_KEY_ID: "********" ## aws access key id value
    AWS_SECRET_ACCESS_KEY: "********" ## aws access key secret

Deploy chartmuseum with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chartmuseum on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchartmuseum is pinned at v1.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply