Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

ct dynamic data in systemd units #2085

Description

@dghubble

Feature Request

Problem

I found a use-case where I wanted a Container Linux Config to contain a systemd unit that refered to coreos-metadata.

[Unit]
Requires=coreos-metadata.service                                                                                                                                                                       
After=coreos-metadata.service
[Service]
EnvironmentFile=/run/metadata/coreos

I thought I'd try ct's "dynamic data" feature where it adds those lines for you based on a {PRIVATE_IPV4} or {PUBLIC_IPV4} reference. I was surprised this didn't work and just wrote the change myself.

Environment

Cloud Providers

Desired Feature

Dynamic data docs that say "In specific sections of a config, users can enter in dynamic data between {} ... Currently, the etcd and flannel sections are the only ones which support this feature."

It would be valuable to support this substitution in the systemd section.

Other Information.

Maybe we just clearly document how to reference coreos-metadata directly, without the magic? I knew this feature existed and I still kinda found it opaque to find and use and read in configs. It also seems a bit odd its specific to certain apps right now and more clusters these days run etcd and flannel as pods anyway. If that's not the desired direction, no worries, just a thought.

cc @dgonyeo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions