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

Refactor for envs vars, labels and annotations #1444

Merged
merged 5 commits into from
Apr 23, 2021

Conversation

jLopezbarb
Copy link
Contributor

Fixes #1415

Proposed changes

  • Now these three fields works in the same way when unmarshalling them.
  • They can accept map and list syntax.
  • When unmarshalling you can use env vars as key or value

Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #1444 (1922a02) into master (b64902f) will increase coverage by 0.26%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1444      +/-   ##
==========================================
+ Coverage   36.24%   36.51%   +0.26%     
==========================================
  Files          79       79              
  Lines        7261     7276      +15     
==========================================
+ Hits         2632     2657      +25     
+ Misses       4301     4287      -14     
- Partials      328      332       +4     
Impacted Files Coverage Δ
pkg/k8s/deployments/crud.go 23.11% <0.00%> (ø)
pkg/k8s/services/translate.go 0.00% <0.00%> (ø)
pkg/model/stack.go 41.12% <0.00%> (ø)
pkg/model/translation.go 0.00% <ø> (ø)
pkg/model/dev.go 56.45% <60.00%> (ø)
pkg/model/serializer.go 63.49% <73.68%> (+1.34%) ⬆️
pkg/cmd/stack/translate.go 84.74% <100.00%> (ø)
pkg/model/stack_serializer.go 39.27% <100.00%> (+1.47%) ⬆️

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 b64902f...1922a02. Read the comment docs.

pkg/model/dev.go Outdated
@@ -127,7 +127,7 @@ type Dev struct {
Image *BuildInfo `json:"image,omitempty" yaml:"image,omitempty"`
Push *BuildInfo `json:"-" yaml:"push,omitempty"`
ImagePullPolicy apiv1.PullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"`
Environment []EnvVar `json:"environment,omitempty" yaml:"environment,omitempty"`
Environment Environments `json:"environment,omitempty" yaml:"environment,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Environment Environments `json:"environment,omitempty" yaml:"environment,omitempty"`
Environment Environment `json:"environment,omitempty" yaml:"environment,omitempty"`

Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb jLopezbarb merged commit 2479895 into master Apr 23, 2021
@jLopezbarb jLopezbarb deleted the jlopezbarb/labels-refactor branch April 23, 2021 09:13
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.

Replace envvars in labels and annotations
2 participants