mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #21730 from lavalamp/fix-proxy-svc-pod
add readiness probe to proxy test
This commit is contained in:
commit
0b4d702e04
@ -125,6 +125,16 @@ func proxyContext(version string) {
|
|||||||
"tlsdest1": 460,
|
"tlsdest1": 460,
|
||||||
"tlsdest2": 462,
|
"tlsdest2": 462,
|
||||||
},
|
},
|
||||||
|
ReadinessProbe: &api.Probe{
|
||||||
|
Handler: api.Handler{
|
||||||
|
HTTPGet: &api.HTTPGetAction{
|
||||||
|
Port: intstr.FromInt(80),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
InitialDelaySeconds: 1,
|
||||||
|
TimeoutSeconds: 5,
|
||||||
|
PeriodSeconds: 10,
|
||||||
|
},
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
CreatedPods: &pods,
|
CreatedPods: &pods,
|
||||||
}
|
}
|
||||||
|
@ -234,19 +234,20 @@ func (s *podStore) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RCConfig struct {
|
type RCConfig struct {
|
||||||
Client *client.Client
|
Client *client.Client
|
||||||
Image string
|
Image string
|
||||||
Command []string
|
Command []string
|
||||||
Name string
|
Name string
|
||||||
Namespace string
|
Namespace string
|
||||||
PollInterval time.Duration
|
PollInterval time.Duration
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
PodStatusFile *os.File
|
PodStatusFile *os.File
|
||||||
Replicas int
|
Replicas int
|
||||||
CpuRequest int64 // millicores
|
CpuRequest int64 // millicores
|
||||||
CpuLimit int64 // millicores
|
CpuLimit int64 // millicores
|
||||||
MemRequest int64 // bytes
|
MemRequest int64 // bytes
|
||||||
MemLimit int64 // bytes
|
MemLimit int64 // bytes
|
||||||
|
ReadinessProbe *api.Probe
|
||||||
|
|
||||||
// Env vars, set the same for every pod.
|
// Env vars, set the same for every pod.
|
||||||
Env map[string]string
|
Env map[string]string
|
||||||
@ -1633,10 +1634,11 @@ func (config *RCConfig) create() error {
|
|||||||
Spec: api.PodSpec{
|
Spec: api.PodSpec{
|
||||||
Containers: []api.Container{
|
Containers: []api.Container{
|
||||||
{
|
{
|
||||||
Name: config.Name,
|
Name: config.Name,
|
||||||
Image: config.Image,
|
Image: config.Image,
|
||||||
Command: config.Command,
|
Command: config.Command,
|
||||||
Ports: []api.ContainerPort{{ContainerPort: 80}},
|
Ports: []api.ContainerPort{{ContainerPort: 80}},
|
||||||
|
ReadinessProbe: config.ReadinessProbe,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
DNSPolicy: api.DNSDefault,
|
DNSPolicy: api.DNSDefault,
|
||||||
|
Loading…
Reference in New Issue
Block a user