Skip to content

Commit

Permalink
Fix the typo and change the validate type
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchiu committed Aug 16, 2018
1 parent bb98b12 commit 04205fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/entity/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ type Pod struct {
ID bson.ObjectId `bson:"_id,omitempty" json:"id" validate:"-"`
Name string `bson:"name" json:"name" validate:"required,k8sname"`
Namespace string `bson:"namespace" json:"namespace" validate:"required"`
Labels map[string]string `bson:"labels,omitempty" json:"labels" validate:"required,dive,keys,alphanum,endkeys,required,alphanum"`
EnvVars map[string]string `bson:"envVars,omitempty" json:"envVars" validate:"required,dive,keys,alphanum,endkeys,required,alphanum"`
Labels map[string]string `bson:"labels,omitempty" json:"labels" validate:"required,dive,keys,printascii,endkeys,required,printascii"`
EnvVars map[string]string `bson:"envVars,omitempty" json:"envVars" validate:"required,dive,keys,printascii,endkeys,required,printascii"`
Containers []Container `bson:"containers" json:"containers" validate:"required,dive,required"`
Volumes []PodVolume `bson:"volumes,omitempty" json:"volumes" validate:"required,dive,required"`
Networks []PodNetwork `bson:"networks,omitempty" json:"networks" validate:"required,dive,required"`
Expand Down
2 changes: 1 addition & 1 deletion tests/02-hoet-network/pod.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@PODNAME@",
"labels":{},
"envVars:{
"envVars":{
"myip":"1.2.3.4"
},
"namespace":"default",
Expand Down

0 comments on commit 04205fa

Please sign in to comment.