Support annotations in environment specs (#733)
* Added annotations to runtime and builder environment specs * Use crd annotations for env pod
This commit is contained in:
committed by
Ta-Ching Chen
parent
65fd1d9fbb
commit
032d1a8b9a
@@ -485,10 +485,12 @@ func (gp *GenericPool) createPool() error {
|
||||
gracePeriodSeconds = gp.env.Spec.TerminationGracePeriod
|
||||
}
|
||||
|
||||
podAnnotation := make(map[string]string)
|
||||
|
||||
podAnnotations := gp.env.Metadata.Annotations
|
||||
if podAnnotations == nil {
|
||||
podAnnotations = make(map[string]string)
|
||||
}
|
||||
if gp.useIstio && gp.env.Spec.AllowAccessToExternalNetwork {
|
||||
podAnnotation["sidecar.istio.io/inject"] = "false"
|
||||
podAnnotations["sidecar.istio.io/inject"] = "false"
|
||||
}
|
||||
|
||||
deployment := &v1beta1.Deployment{
|
||||
@@ -504,7 +506,7 @@ func (gp *GenericPool) createPool() error {
|
||||
Template: apiv1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: gp.labelsForPool,
|
||||
Annotations: podAnnotation,
|
||||
Annotations: podAnnotations,
|
||||
},
|
||||
Spec: apiv1.PodSpec{
|
||||
Volumes: []apiv1.Volume{
|
||||
|
||||
Reference in New Issue
Block a user