spiegel_podman/pkg/domain/entities/generate.go
Urvashi Mohnani 4f90194068 Support Deployment generation with kube generate
The podman kube generate command can now generate a
Deployment kind when the --ype flag is set to deployment.
By default, a Pod spec will be generated if --type flag is
not set.
Add --replicas flag to kube generate to allow users to set
the value of replicas in the generated yaml when generating a
Deployment kind.
Add e2e and minikube tests for this feature.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-31 13:34:38 -04:00

59 lines
1.5 KiB
Go

package entities
import "io"
// GenerateSystemdOptions control the generation of systemd unit files.
type GenerateSystemdOptions struct {
Name bool
New bool
RestartPolicy *string
RestartSec *uint
StartTimeout *uint
StopTimeout *uint
ContainerPrefix string
PodPrefix string
Separator string
NoHeader bool
TemplateUnitFile bool
Wants []string
After []string
Requires []string
AdditionalEnvVariables []string
}
// GenerateSystemdReport
type GenerateSystemdReport struct {
// Units of the generate process. key = unit name -> value = unit content
Units map[string]string
}
// GenerateKubeOptions control the generation of Kubernetes YAML files.
type GenerateKubeOptions struct {
// Service - generate YAML for a Kubernetes _service_ object.
Service bool
// Type - the k8s kind to be generated i.e Pod or Deployment
Type string
// Replicas - the value to set in the replicas field for a Deployment
Replicas int32
}
type KubeGenerateOptions = GenerateKubeOptions
// GenerateKubeReport
//
// FIXME: Podman4.0 should change io.Reader to io.ReaderCloser
type GenerateKubeReport struct {
// Reader - the io.Reader to reader the generated YAML file.
Reader io.Reader
}
type GenerateSpecReport struct {
Data []byte
}
type GenerateSpecOptions struct {
ID string
FileName string
Compact bool
Name bool
}