Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab0c820a1d |
@@ -32,31 +32,11 @@ locals {
|
|||||||
trimsuffix(basename(file_path), ".yaml") => content
|
trimsuffix(basename(file_path), ".yaml") => content
|
||||||
if startswith(file_path, "remote_helm/")
|
if startswith(file_path, "remote_helm/")
|
||||||
}
|
}
|
||||||
remote_pypi = {
|
|
||||||
for file_path, content in local.all_configs :
|
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
|
||||||
if startswith(file_path, "remote_pypi/")
|
|
||||||
}
|
|
||||||
remote_rpm = {
|
remote_rpm = {
|
||||||
for file_path, content in local.all_configs :
|
for file_path, content in local.all_configs :
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
trimsuffix(basename(file_path), ".yaml") => content
|
||||||
if startswith(file_path, "remote_rpm/")
|
if startswith(file_path, "remote_rpm/")
|
||||||
}
|
}
|
||||||
local_terraform = {
|
|
||||||
for file_path, content in local.all_configs :
|
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
|
||||||
if startswith(file_path, "local_terraform/")
|
|
||||||
}
|
|
||||||
local_pypi = {
|
|
||||||
for file_path, content in local.all_configs :
|
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
|
||||||
if startswith(file_path, "local_pypi/")
|
|
||||||
}
|
|
||||||
local_rpm = {
|
|
||||||
for file_path, content in local.all_configs :
|
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
|
||||||
if startswith(file_path, "local_rpm/")
|
|
||||||
}
|
|
||||||
virtual = {
|
virtual = {
|
||||||
for file_path, content in local.all_configs :
|
for file_path, content in local.all_configs :
|
||||||
trimsuffix(basename(file_path), ".yaml") => content
|
trimsuffix(basename(file_path), ".yaml") => content
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
description: "Internal PyPI packages"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
description: "Internal RPM packages"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
description: "Unkin Terraform modules"
|
|
||||||
@@ -3,9 +3,7 @@ description: Docker Hub registry
|
|||||||
immutable_ttl: 0
|
immutable_ttl: 0
|
||||||
mutable_ttl: 300
|
mutable_ttl: 300
|
||||||
patterns:
|
patterns:
|
||||||
- "^alpine/"
|
|
||||||
- "^library/almalinux"
|
- "^library/almalinux"
|
||||||
- "^library/alpine"
|
|
||||||
- "^library/busybox"
|
- "^library/busybox"
|
||||||
- "^library/debian"
|
- "^library/debian"
|
||||||
- "^library/fedora"
|
- "^library/fedora"
|
||||||
@@ -18,14 +16,10 @@ patterns:
|
|||||||
- "^emberstack/kubernetes-reflector"
|
- "^emberstack/kubernetes-reflector"
|
||||||
- "^hashicorp/consul"
|
- "^hashicorp/consul"
|
||||||
- "^hashicorp/vault"
|
- "^hashicorp/vault"
|
||||||
- "^intel/"
|
|
||||||
- "^jfrog/"
|
- "^jfrog/"
|
||||||
- "^jpgouin/"
|
|
||||||
- "^kanidm/"
|
- "^kanidm/"
|
||||||
- "^osixia/"
|
|
||||||
- "^rancher/"
|
- "^rancher/"
|
||||||
- "^rspamd/rspamd"
|
- "^rspamd/rspamd"
|
||||||
- "^tiredofit/"
|
|
||||||
- "^tozd/postfix"
|
- "^tozd/postfix"
|
||||||
- "^traefik/"
|
- "^traefik/"
|
||||||
- "^valkey/valkey"
|
- "^valkey/valkey"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
base_url: https://public.ecr.aws
|
|
||||||
description: Amazon ECR Public registry
|
|
||||||
immutable_ttl: 0
|
|
||||||
mutable_ttl: 300
|
|
||||||
patterns:
|
|
||||||
- "^docker/library/"
|
|
||||||
@@ -3,18 +3,10 @@ description: GitHub Container Registry
|
|||||||
immutable_ttl: 0
|
immutable_ttl: 0
|
||||||
mutable_ttl: 300
|
mutable_ttl: 300
|
||||||
patterns:
|
patterns:
|
||||||
- "^cloudnative-pg/"
|
- "^cloudnative-pg/cloudnative-pg"
|
||||||
- "^dexidp/"
|
|
||||||
- "^emberstack/helm-charts"
|
- "^emberstack/helm-charts"
|
||||||
- "^fallenbagel/"
|
|
||||||
- "^goauthentik/"
|
|
||||||
- "^home-operations/"
|
|
||||||
- "^jellyfin/"
|
|
||||||
- "^onedr0p/"
|
|
||||||
- "^open-webui/open-webui"
|
- "^open-webui/open-webui"
|
||||||
- "^openvoxproject/"
|
- "^openvoxproject/"
|
||||||
- "^paperclipai/"
|
|
||||||
- "^plexguide/"
|
|
||||||
- "^stakater/reloader"
|
- "^stakater/reloader"
|
||||||
- "^stalwartlabs/stalwart"
|
- "^stalwartlabs/stalwart"
|
||||||
- "^voxpupuli/puppetboard"
|
- "^voxpupuli/puppetboard"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
base_url: https://docker.litellm.ai
|
|
||||||
description: LiteLLM container registry
|
|
||||||
immutable_ttl: 0
|
|
||||||
mutable_ttl: 300
|
|
||||||
patterns:
|
|
||||||
- "^berriai/"
|
|
||||||
@@ -3,7 +3,6 @@ description: Quay.io container registry
|
|||||||
immutable_ttl: 0
|
immutable_ttl: 0
|
||||||
mutable_ttl: 300
|
mutable_ttl: 300
|
||||||
patterns:
|
patterns:
|
||||||
- "^argoproj/"
|
|
||||||
- "^brancz/kube-rbac-proxy"
|
- "^brancz/kube-rbac-proxy"
|
||||||
- "^cephcsi/cephcsi"
|
- "^cephcsi/cephcsi"
|
||||||
- "^jetstack/cert-manager-"
|
- "^jetstack/cert-manager-"
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ immutable_ttl: 0
|
|||||||
mutable_ttl: 7200
|
mutable_ttl: 7200
|
||||||
patterns:
|
patterns:
|
||||||
- "argoproj/argo-cd/.*.yaml$"
|
- "argoproj/argo-cd/.*.yaml$"
|
||||||
- "datreeio/CRDs-catalog/main/.*.json$"
|
|
||||||
- "kubernetes/kubernetes/.*.json$"
|
|
||||||
- "yannh/kubernetes-json-schema/master/.*.json$"
|
- "yannh/kubernetes-json-schema/master/.*.json$"
|
||||||
|
- "datreeio/CRDs-catalog/main/.*.json$"
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
base_url: https://charts.goauthentik.io
|
|
||||||
description: Authentik Charts
|
|
||||||
immutable_ttl: 0
|
|
||||||
mutable_ttl: 3600
|
|
||||||
check_mutable: true
|
|
||||||
immutable_patterns:
|
|
||||||
- "\\.tgz$"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
base_url: https://grafana.github.io/helm-charts
|
|
||||||
description: Grafana Helm charts
|
|
||||||
immutable_ttl: 0
|
|
||||||
mutable_ttl: 3600
|
|
||||||
check_mutable: true
|
|
||||||
immutable_patterns:
|
|
||||||
- "\\.tgz$"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
base_url: https://pypi.org
|
|
||||||
description: "PyPI — Python Package Index"
|
|
||||||
immutable_ttl: 0
|
|
||||||
mutable_ttl: 3600
|
|
||||||
stale_on_error: true
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
base_url: "https://downloads.claude.ai/claude-code/rpm/stable"
|
|
||||||
description: "Claude Code RPM repository"
|
|
||||||
immutable_patterns:
|
|
||||||
- ".*/x86_64/.*\\.rpm$"
|
|
||||||
- ".*/noarch/.*\\.rpm$"
|
|
||||||
- ".*/repodata/.*\\.xml.*$"
|
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
package_type: helm
|
package_type: helm
|
||||||
description: "Virtual repository merging all helm remotes — member order is priority order for duplicate chart+version"
|
description: "Virtual repository merging all helm remotes — member order is priority order for duplicate chart+version"
|
||||||
members:
|
members:
|
||||||
- authentik
|
|
||||||
- ceph-csi
|
- ceph-csi
|
||||||
- cnpg
|
- cnpg
|
||||||
- elastic-helm
|
- elastic-helm
|
||||||
- external-dns
|
- external-dns
|
||||||
- grafana
|
|
||||||
- hashicorp-helm
|
- hashicorp-helm
|
||||||
- intel-helm
|
- intel-helm
|
||||||
- jetstack
|
- jetstack
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package_type: pypi
|
|
||||||
description: "Virtual PyPI repository merging internal packages and upstream PyPI"
|
|
||||||
members:
|
|
||||||
- pypi-internal
|
|
||||||
- pypi
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
include "root" {
|
|
||||||
path = find_in_parent_folders("root.hcl")
|
|
||||||
expose = true
|
|
||||||
}
|
|
||||||
|
|
||||||
include "config" {
|
|
||||||
path = "${get_repo_root()}/config/config.hcl"
|
|
||||||
expose = true
|
|
||||||
}
|
|
||||||
|
|
||||||
locals {
|
|
||||||
config = include.config.locals.config
|
|
||||||
}
|
|
||||||
|
|
||||||
terraform {
|
|
||||||
source = "../../modules/artifactapi"
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
remote_alpine = local.config.remote_alpine
|
|
||||||
remote_docker = local.config.remote_docker
|
|
||||||
remote_generic = local.config.remote_generic
|
|
||||||
remote_goproxy = local.config.remote_goproxy
|
|
||||||
remote_helm = local.config.remote_helm
|
|
||||||
remote_pypi = local.config.remote_pypi
|
|
||||||
remote_rpm = local.config.remote_rpm
|
|
||||||
local_terraform = local.config.local_terraform
|
|
||||||
local_pypi = local.config.local_pypi
|
|
||||||
local_rpm = local.config.local_rpm
|
|
||||||
virtual = local.config.virtual
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
include "root" {
|
||||||
|
path = find_in_parent_folders("root.hcl")
|
||||||
|
expose = true
|
||||||
|
}
|
||||||
|
|
||||||
|
include "config" {
|
||||||
|
path = "${get_repo_root()}/config/config.hcl"
|
||||||
|
expose = true
|
||||||
|
}
|
||||||
|
|
||||||
|
locals {
|
||||||
|
config = include.config.locals.config
|
||||||
|
}
|
||||||
|
|
||||||
|
terraform {
|
||||||
|
source = "../../../modules/artifactapi"
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
remote_alpine = local.config.remote_alpine
|
||||||
|
remote_docker = local.config.remote_docker
|
||||||
|
remote_generic = local.config.remote_generic
|
||||||
|
remote_goproxy = local.config.remote_goproxy
|
||||||
|
remote_helm = local.config.remote_helm
|
||||||
|
remote_rpm = local.config.remote_rpm
|
||||||
|
virtual = local.config.virtual
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ generate "backend" {
|
|||||||
if_exists = "overwrite"
|
if_exists = "overwrite"
|
||||||
contents = <<EOF
|
contents = <<EOF
|
||||||
provider "artifactapi" {
|
provider "artifactapi" {
|
||||||
endpoint = "https://${path_relative_to_include()}"
|
endpoint = "https://artifactapi.k8s.syd1.au.unkin.net"
|
||||||
}
|
}
|
||||||
|
|
||||||
terraform {
|
terraform {
|
||||||
@@ -18,7 +18,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
artifactapi = {
|
artifactapi = {
|
||||||
source = "git.unkin.net/unkin/artifactapi"
|
source = "git.unkin.net/unkin/artifactapi"
|
||||||
version = "0.1.0"
|
version = "0.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,40 +76,6 @@ resource "artifactapi_remote_rpm" "this" {
|
|||||||
stale_on_error = each.value.stale_on_error
|
stale_on_error = each.value.stale_on_error
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "artifactapi_remote_pypi" "this" {
|
|
||||||
for_each = var.remote_pypi
|
|
||||||
|
|
||||||
name = each.key
|
|
||||||
base_url = each.value.base_url
|
|
||||||
description = each.value.description
|
|
||||||
immutable_ttl = each.value.immutable_ttl
|
|
||||||
mutable_ttl = each.value.mutable_ttl
|
|
||||||
patterns = each.value.patterns
|
|
||||||
mutable_patterns = each.value.mutable_patterns
|
|
||||||
stale_on_error = each.value.stale_on_error
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "artifactapi_local_terraform" "this" {
|
|
||||||
for_each = var.local_terraform
|
|
||||||
|
|
||||||
name = each.key
|
|
||||||
description = each.value.description
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "artifactapi_local_pypi" "this" {
|
|
||||||
for_each = var.local_pypi
|
|
||||||
|
|
||||||
name = each.key
|
|
||||||
description = each.value.description
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "artifactapi_local_rpm" "this" {
|
|
||||||
for_each = var.local_rpm
|
|
||||||
|
|
||||||
name = each.key
|
|
||||||
description = each.value.description
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "artifactapi_virtual" "this" {
|
resource "artifactapi_virtual" "this" {
|
||||||
for_each = var.virtual
|
for_each = var.virtual
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
terraform {
|
||||||
|
required_version = ">= 1.10"
|
||||||
|
required_providers {
|
||||||
|
artifactapi = {
|
||||||
|
source = "git.unkin.net/unkin/artifactapi"
|
||||||
|
version = "0.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -82,44 +82,6 @@ variable "remote_rpm" {
|
|||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "remote_pypi" {
|
|
||||||
description = "Map of PyPI remote repositories"
|
|
||||||
type = map(object({
|
|
||||||
base_url = string
|
|
||||||
description = optional(string, "")
|
|
||||||
immutable_ttl = optional(number, 0)
|
|
||||||
mutable_ttl = optional(number, 3600)
|
|
||||||
patterns = optional(list(string), [])
|
|
||||||
mutable_patterns = optional(list(string), [])
|
|
||||||
stale_on_error = optional(bool, true)
|
|
||||||
}))
|
|
||||||
default = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "local_pypi" {
|
|
||||||
description = "Map of local PyPI repositories"
|
|
||||||
type = map(object({
|
|
||||||
description = optional(string, "")
|
|
||||||
}))
|
|
||||||
default = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "local_rpm" {
|
|
||||||
description = "Map of local RPM repositories"
|
|
||||||
type = map(object({
|
|
||||||
description = optional(string, "")
|
|
||||||
}))
|
|
||||||
default = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "local_terraform" {
|
|
||||||
description = "Map of local Terraform repositories"
|
|
||||||
type = map(object({
|
|
||||||
description = optional(string, "")
|
|
||||||
}))
|
|
||||||
default = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "virtual" {
|
variable "virtual" {
|
||||||
description = "Map of virtual repositories"
|
description = "Map of virtual repositories"
|
||||||
type = map(object({
|
type = map(object({
|
||||||
|
|||||||
Reference in New Issue
Block a user