INNER CODE UNIT · Go

fieldIsMandatory

fluxcd/flagger · pkg/canary/config_tracker.go:239

func fieldIsMandatory(p *bool) bool {
	if p == nil {
		return true
	}
	return !*p
}

// GetConfigRefs returns a map of configs and their checksum
func (ct *ConfigTracker) GetConfigRefs(cd *flaggerv1.Canary) (*map[string]string, error) {
	res := make(map[string]string)
	configs, err := ct.GetTargetConfigs(cd)
	if err != nil {
		return nil, fmt.Errorf("GetTargetConfigs failed: %w", err)
	}

	for _, cfg := range configs {
		res[cfg.GetName()] = cfg.Checksum
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…