Skip to content

Commit

Permalink
Pass 2 : Updated name
Browse files Browse the repository at this point in the history
Signed-off-by: Viraj Kulkarni <[email protected]>
  • Loading branch information
Viraj Kulkarni committed May 2, 2024
1 parent acd3c83 commit a6db624
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func main() {
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.DurationVar(&flagReconcilerTime, "reconciler-time", 10*time.Hour, "The flippy reconciler time.")
flag.StringVar(&common.IgnoreMetadata, "ignore-metadata", "flippy-ignore", "Annotation (Rollout/Deployment) and Label (Namespace) to be ignored")
flag.StringVar(&common.IgnoreMetadataKey, "flippy-ignore-key", "flippy-ignore", "Annotation (Rollout/Deployment) and Label (Namespace) to be ignored")

opts := zap.Options{
Development: true,
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/Constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ type RestartObjects struct {
RestartConfig crdv1.StatusCheckConfig
}

var IgnoreMetadata string
var IgnoreMetadataKey string
2 changes: 1 addition & 1 deletion pkg/k8s-utils/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func StringArrayContains(s []string, str string) bool {
}

func IsStringMapSubset(masterMap map[string]string, subsetMap map[string]string) bool {
flippyIgnore, ok := masterMap[common.IgnoreMetadata]
flippyIgnore, ok := masterMap[common.IgnoreMetadataKey]

if ok && strings.ToLower(flippyIgnore) == "true" {
return false
Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s-utils/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestIsStringMapSubset(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.args != "empty" {
common.IgnoreMetadata = tt.args
common.IgnoreMetadataKey = tt.args
}
if got := IsStringMapSubset(masterMap, subsetMap); got != tt.want {
t.Errorf("IsStringMapSubset() = %v, want %v", got, tt.want)
Expand Down

0 comments on commit a6db624

Please sign in to comment.