Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions modules/ignition/assets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ data "ignition_systemd_unit" "kubelet" {
enabled = true
content = "${data.template_file.kubelet.rendered}"
}

data "ignition_file" "registries_config" {
filesystem = "root"
mode = "0644"
path = "/etc/containers/registries.conf"

content {
content = "${file("${path.module}/resources/files/registries.conf")}"
}
}
1 change: 1 addition & 0 deletions modules/ignition/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ output "ignition_file_id_list" {
"${data.ignition_file.root_ca_cert_pem.id}",
"${data.ignition_file.ingress_ca_cert_pem.id}",
"${data.ignition_file.etcd_ca_cert_pem.id}",
"${data.ignition_file.registries_config.id}",
]
}

Expand Down
25 changes: 25 additions & 0 deletions modules/ignition/resources/files/registries.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a system-wide configuration file used to
# keep track of registries for various container backends.
# It adheres to TOML format and does not support recursive
# lists of registries.

# The default location for this configuration file is /etc/containers/registries.conf.

# The only valid categories are: 'registries.search', 'registries.insecure',
# and 'registries.block'.

[registries.search]
registries = ['registry.access.redhat.com', 'docker.io']

# If you need to access insecure registries, add the registry's fully-qualified name.
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP.
[registries.insecure]
registries = []


# If you need to block pull access from a registry, uncomment the section below
# and add the registries fully-qualified name.
#
# Docker only
[registries.block]
registries = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs are not super clear, but it seems like we could accomplish this same result by leaving this block (and registries.insecure) off entirely. If that's the case, I'd rather have the file content be just:

# Configure container registries.  Docs in containers-registries.conf(5).

[registries.search]
registries = ['registry.access.redhat.com', 'docker.io']

or similar.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wking I tested this out and it does appear that you can remove these sections completely.