Skip to content

Commit

Permalink
Update deployment service
Browse files Browse the repository at this point in the history
- The deployment service now properly passes omitempty
  for fieldRef values
  • Loading branch information
oshalygin committed Aug 10, 2017
1 parent 57afb89 commit 97b6e34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.0 (August 09, 2017)

- Updated deployment service to now properly handle null and zero values with `omitempty` for `fieldRef` environment variable properties.

## 1.1.0 (July 30, 2017)

- Updated deployment service to now properly handle null and zero values with `omitempty`.
Expand Down
8 changes: 7 additions & 1 deletion models/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ type SecretKeyRef struct {
Key string
}

// FieldRef is the configuration object of how values are pulled from the cluster
type FieldRef struct {
FieldPath string `yaml:"fieldPath,omitempty"`
}

// ValueFrom is the configuration object of how values are pulled
type ValueFrom struct {
SecretKeyRef `yaml:"secretKeyRef"`
SecretKeyRef `yaml:"secretKeyRef,omitempty"`
FieldRef `yaml:"fieldRef,omitempty"`
}

// VolumeMounts provides a configuration for additional pod volumes
Expand Down

0 comments on commit 97b6e34

Please sign in to comment.