Skip to content

Customize the Lookup Label#14

Merged
byjg merged 11 commits intomasterfrom
dokku
Aug 14, 2022
Merged

Customize the Lookup Label#14
byjg merged 11 commits intomasterfrom
dokku

Conversation

@byjg
Copy link
Copy Markdown
Owner

@byjg byjg commented Aug 11, 2022

Currently, the lookup label is hard coded to easyhaproxy.

This PR adds the possibility to customize this label by adding an environment variable LOOKUP_LABEL to the byjg/easyhaproxy container.

This fixes issue #11

Comment thread README.md Outdated
| Environment Variable | Description |
|----------------------|-------------------------------------------------------------------------------|
| DISCOVER | How `haproxy.cfg` will be created: `static`, `docker` or `swarm` |
| LOOKUP_LABEL | (Optional) The key will search to match resources. Default: `easyhaproxy`. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this have HAPROXY_ as the prefix so it matches the other env vars?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LOOKUP_LABEL=haproxy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No I meant should it be renamed to HAPROXY_LOOKUP_LABEL?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I don't know. When we say "HAPROXY_LOOKUP_LABEL" I understand that it should be a HAPROXY feature, which is not completely true, since the service discovery is not a HAPROXY feature.

But I agree, I don't like LOOKUP_LABEL name too. I just didn't find one better.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

EASYHAPROXY_LABEL maybe?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or EASYHAPROXY_LABEL_PREFIX?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I like it. Let me change that.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Based on that, can I change the env from DISCOVER to EASYHAPROXY_DISCOVER ?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I added this to PR #16

@byjg byjg merged commit b4af1e2 into master Aug 14, 2022
@byjg byjg deleted the dokku branch August 14, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants