Skip to content

Commit

Permalink
enum
Browse files Browse the repository at this point in the history
  • Loading branch information
diranged committed Jan 21, 2024
1 parent bf00cea commit fe8c744
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,14 @@
// https://github.com/segmentio/golines#visual-studio-code
"emeraldwalk.runonsave": {
"commands": [{ "match": "\\.go$", "cmd": "golines ${file} -w" }]
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/node_modules": true
}
}
14 changes: 13 additions & 1 deletion internal/api/v1alpha1/pod_spec_mutation_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,22 @@ type PodTemplateSpecMutationConfig struct {
NodeSelector *map[string]string `json:"nodeSelector,omitempty"`
}

type JSONPatchOperationType string

Check warning on line 131 in internal/api/v1alpha1/pod_spec_mutation_config.go

View workflow job for this annotation

GitHub Actions / lint / lint

exported type JSONPatchOperationType should have comment or be unexported

// Valid Operation Types
const (
JSONPatchOperationTypeAdd JSONPatchOperationType = "add"
JSONPatchOperationTypeRemove JSONPatchOperationType = "remove"
JSONPatchOperationTypeReplace JSONPatchOperationType = "replace"
JSONPatchOperationTypeMove JSONPatchOperationType = "move"
JSONPatchOperationTypeCopy JSONPatchOperationType = "copy"
JSONPatchOperationTypeTest JSONPatchOperationType = "test"
)

// JSONPatchOperation represents a JSON Patch operation defined in https://www.rfc-editor.org/rfc/rfc6902.html
type JSONPatchOperation struct {
// +kubebuilder:validation:Required
Operation string `json:"op"`
Operation JSONPatchOperationType `json:"op"`
// +kubebuilder:validation:Required
Path string `json:"path"`
// +kubebuilder:validation:Optional
Expand Down

0 comments on commit fe8c744

Please sign in to comment.