Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update annotations to use kubernetes convention #114

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Conversation

werne2j
Copy link
Member

@werne2j werne2j commented Apr 20, 2021

Description

Update annotations to follow kubernetes annotation convention

Fixes: #112

Checklist

Please make sure that your PR fulfills the following requirements:

  • Reviewed the guidelines for contributing to this repository
  • The commit message follows the Conventional Commits Guidelines.
  • Tests for the changes have been updated
  • Docs have been added / updated

Type of Change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

@werne2j werne2j requested a review from jkayani as a code owner April 20, 2021 13:31
@werne2j werne2j self-assigned this Apr 20, 2021
@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

❗ No coverage uploaded for pull request base (next@e16d261). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next     #114   +/-   ##
=======================================
  Coverage        ?   53.35%           
=======================================
  Files           ?       16           
  Lines           ?      521           
  Branches        ?        0           
=======================================
  Hits            ?      278           
  Misses          ?      202           
  Partials        ?       41           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e16d261...3b0554b. Read the comment docs.

Copy link
Member

@jkayani jkayani left a comment

Choose a reason for hiding this comment

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

Let's make the annotation strings into constants/enums

cmd/generate.go Outdated
@@ -65,7 +65,7 @@ func NewGenerateCommand() *cobra.Command {
}

annotations := manifest.GetAnnotations()
avpIgnore, _ := strconv.ParseBool(annotations["avp_ignore"])
avpIgnore, _ := strconv.ParseBool(annotations["avp.kubernetes.io/ignore"])
Copy link
Member

Choose a reason for hiding this comment

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

Missed a spot for using the enum instead of the string


AVPPathAnnotation = "avp.kubernetes.io/path"
AVPIgnoreAnnotation = "avp.kubernetes.io/ignore"
KVVersionAnnotation = "avp.kubernetes.io/kv-version"
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't really matter but VaultKVVersionAnnotation might be a better name especially since that only applies to Vault and this plugin now supports non-Vault things

@werne2j werne2j merged commit 5f099b4 into next Apr 21, 2021
@werne2j werne2j deleted the migrationDocs branch April 21, 2021 15:08
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.

None yet

2 participants