forked from chainguard-images/images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
148 lines (121 loc) · 3.81 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
terraform {
required_providers {
apko = { source = "chainguard-dev/apko" }
imagetest = { source = "chainguard-dev/imagetest" }
}
# We don't take advantage of terraform.tfstate, so we don't need to save state anywhere.
#
# The default "local" backend has pathological performance as state gets large, see:
# https://github.com/opentofu/opentofu/issues/578
#
# Consider removing this if that's ever fixed and/or if we want to use tfstate.
backend "inmem" {}
}
variable "tests_skip_all" {
type = bool
default = false
}
variable "tests_include_by_label" {
type = map(string)
default = {}
}
variable "tests_exclude_by_label" {
type = map(string)
default = {}
}
provider "imagetest" {
repo = "${var.target_repository}/imagetest"
test_execution = {
skip_all_tests = var.tests_skip_all
include_by_label = var.tests_include_by_label
exclude_by_label = var.tests_exclude_by_label
}
log = {
file = {
directory = "imagetest-logs"
}
}
}
variable "target_repository" {
type = string
description = "The root repo into which the images should be published (e.g., cgr.dev/chainguard). Individual images will be published within this root repo."
}
variable "extra_repositories" {
type = list(string)
default = []
description = "Extra repositories to look for when finding packages."
}
variable "extra_keyring" {
type = list(string)
default = []
description = "Extra keyrings to use when finding packages."
}
variable "extra_packages" {
type = list(string)
default = []
description = "Extra packages to install in all images."
}
variable "archs" {
type = list(string)
default = []
description = "The architectures to build for. If empty, defaults to x86_64 and aarch64."
}
provider "apko" {
extra_repositories = concat(["https://packages.wolfi.dev/os"], var.extra_repositories)
extra_keyring = concat(["https://packages.wolfi.dev/os/wolfi-signing.rsa.pub"], var.extra_keyring)
extra_packages = concat(["wolfi-baselayout"], var.extra_packages)
default_archs = length(var.archs) == 0 ? ["x86_64", "aarch64"] : var.archs
}
variable "newrelic_license_key" { default = "foo" } # set something valid to avoid targetted local runs
module "busybox" {
source = "./images/busybox"
target_repository = "${var.target_repository}/busybox"
}
module "calico" {
source = "./images/calico"
target_repository = "${var.target_repository}/calico"
}
module "git" {
source = "./images/git"
target_repository = "${var.target_repository}/git"
}
module "graalvm-native" {
source = "./images/graalvm-native"
target_repository = "${var.target_repository}/graalvm-native"
}
module "harbor" {
source = "./images/harbor"
target_repository = "${var.target_repository}/harbor"
}
module "k3s" {
source = "./images/k3s"
target_repository = "${var.target_repository}/k3s"
}
module "kubeflow" {
source = "./images/kubeflow"
target_repository = "${var.target_repository}/kubeflow"
}
module "kubeflow-katib" {
source = "./images/kubeflow-katib"
target_repository = "${var.target_repository}/kubeflow-katib"
}
module "maven" {
source = "./images/maven"
target_repository = "${var.target_repository}/maven"
}
module "powershell" {
source = "./images/powershell"
target_repository = "${var.target_repository}/powershell"
}
module "prometheus" {
source = "./images/prometheus"
target_repository = "${var.target_repository}/prometheus"
}
module "static" {
source = "./images/static"
target_repository = "${var.target_repository}/static"
}
module "terraform" {
source = "./images/terraform"
target_repository = "${var.target_repository}/terraform"
}