recipe

package
v1.4.6-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowedNameTagKey = "allowed_name_tag"
	CustomKey         = "custom"
	BlockLatestTagKey = "block_latest_tag"
	RequireDigestKey  = "require_digest"
	AuditKey          = "audit"
	RulesKey          = "rules"
	HostNameKey       = "hostname"
	ImageNameKey      = "imagename"
	PortKey           = "port"
	RequireKey        = "requiredigest"
	TagKey            = "tag"
	NegateKey         = "negate"
	ValueKey          = "value"
)

Variables

View Source
var AllowedNameTag = &schema.Schema{
	Type:        schema.TypeList,
	Description: "The input schema for image policy allowed-name-tag recipe version v1",
	Optional:    true,
	ForceNew:    true,
	MaxItems:    1,
	Elem: &schema.Resource{
		Schema: map[string]*schema.Schema{
			AuditKey: {
				Type:        schema.TypeBool,
				Description: "Audit (dry-run). Violations will be logged but not denied.",
				Optional:    true,
				Default:     false,
			},
			RulesKey: {
				Type:        schema.TypeList,
				Description: "It specifies a list of rules that defines allowed image patterns.",
				Required:    true,
				MinItems:    1,
				Elem: &schema.Resource{
					Schema: map[string]*schema.Schema{
						ImageNameKey: {
							Type:        schema.TypeString,
							Description: "Allowed image names, wildcards are supported(for example: fooservice/*). Empty field is equivalent to *.",
							Optional:    true,
							Default:     "",
						},
						TagKey: tag,
					},
				},
			},
		},
	},
}
View Source
var BlockLatestTag = &schema.Schema{
	Type:        schema.TypeList,
	Description: "The input schema for image policy block-latest-tag recipe version v1",
	Optional:    true,
	ForceNew:    true,
	MaxItems:    1,
	Elem: &schema.Resource{
		Schema: map[string]*schema.Schema{
			AuditKey: {
				Type:        schema.TypeBool,
				Description: "Audit (dry-run). Violations will be logged but not denied.",
				Optional:    true,
				Default:     false,
			},
		},
	},
}
View Source
var Custom = &schema.Schema{
	Type:        schema.TypeList,
	Description: "The input schema for image policy custom recipe version v1",
	Optional:    true,
	ForceNew:    true,
	MaxItems:    1,
	Elem: &schema.Resource{
		Schema: map[string]*schema.Schema{
			AuditKey: {
				Type:        schema.TypeBool,
				Description: "Audit (dry-run). Violations will be logged but not denied.",
				Optional:    true,
				Default:     false,
			},
			RulesKey: {
				Type:        schema.TypeList,
				Description: "It specifies a list of rules that defines allowed image patterns.",
				Required:    true,
				MinItems:    1,
				Elem: &schema.Resource{
					Schema: map[string]*schema.Schema{
						HostNameKey: {
							Type:        schema.TypeString,
							Description: "Allowed image hostnames, wildcards are supported(for example: *.mycompany.com). Empty field is equivalent to *.",
							Optional:    true,
							Default:     "",
						},
						ImageNameKey: {
							Type:        schema.TypeString,
							Description: "Allowed image names, wildcards are supported(for example: fooservice/*). Empty field is equivalent to *.",
							Optional:    true,
							Default:     "",
						},
						PortKey: {
							Type:        schema.TypeString,
							Description: "Allowed port(if presented) of the image hostname, must associate with valid hostname. Wildcards are supported.",
							Optional:    true,
							Default:     "",
						},
						RequireKey: {
							Type:        schema.TypeBool,
							Description: "The flag used to enforce digest to appear in container images.",
							Optional:    true,
							Default:     false,
						},
						TagKey: tag,
					},
				},
			},
		},
	},
}
View Source
var RequireDigest = &schema.Schema{
	Type:        schema.TypeList,
	Description: "The input schema for image policy require-digest recipe version v1",
	Optional:    true,
	ForceNew:    true,
	MaxItems:    1,
	Elem: &schema.Resource{
		Schema: map[string]*schema.Schema{
			AuditKey: {
				Type:        schema.TypeBool,
				Description: "Audit (dry-run). Violations will be logged but not denied.",
				Optional:    true,
				Default:     false,
			},
		},
	},
}

Functions

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL