Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

WIP Fixes #47 - support default and custom defined/freeform tags #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jhorwit2
Copy link
Member

@jhorwit2 jhorwit2 commented Jul 6, 2018

The tag / value here is based on the aws in-tree provider which tags resources based on the cluster name and whether or not the cluster owns it or not.

@jhorwit2 jhorwit2 requested review from kristenjacobs and prydie July 6, 2018 18:38
@jhorwit2 jhorwit2 force-pushed the jah/fixes-47 branch 2 times, most recently from e4dfa89 to 2179679 Compare July 6, 2018 23:51
@jhorwit2
Copy link
Member Author

jhorwit2 commented Jul 6, 2018

So i've modified the original issue to be more generic. Also, the aws cluster pattern isn't supported in OCI because it contains a period, which would act as a namespace and not allowed in freeform tags.

This now supports default defined and freeform tags via an env var OCI_DEFAULT_TAGS. The default tags can be overridden via the oraclecloud.com/additional-tags annotation on the PVC.

The format for both is comma separated list of defined & freeform tags: (namespace\\.)tag_key=value. This matches the style in dynamic group policies and such for using tags.

My thinking is we could use the exact same logic/annotations/env var in other services like the CCM to tag services.

@jhorwit2 jhorwit2 changed the title WIP Fixes #47 - tag resources with cluster name WIP Fixes #47 - support default and custom defined/freeform tags Jul 7, 2018
@jhorwit2
Copy link
Member Author

jhorwit2 commented Jul 7, 2018

FYI, the e2e tests seem flake kinda often.

@jhorwit2
Copy link
Member Author

@owainlewis thoughts on this implementation?

ociVolumeBackupID = "volume.beta.kubernetes.io/oci-volume-source"
ociVolumeID = "ociVolumeID"
ociVolumeBackupID = "volume.beta.kubernetes.io/oci-volume-source"
ociTagAnnotation = "oraclecloud.com/additional-tags"
Copy link
Member

@owainlewis owainlewis Jul 16, 2018

Choose a reason for hiding this comment

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

oracle.com/additional-tags would be more consistent here with things like the flex driver e.g. oracle.com/oci as the provisioner name.

@owainlewis
Copy link
Member

owainlewis commented Jul 16, 2018

@jhorwit2 I like the implementation. I would prefer oracle.com/additional-tags for consistency between components. We might want to validate duplicates between default and additional tags at the code level as OCI will fail in the presence of duplicate tag keys.

rjtsdl pushed a commit to rjtsdl/oci-volume-provisioner that referenced this pull request Dec 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants