@@ -3,6 +3,7 @@ package v1alpha1
3
3
import (
4
4
"dario.cat/mergo"
5
5
"fmt"
6
+ "github.com/kartverket/skiperator/api/v1alpha1/istiotypes"
6
7
"github.com/kartverket/skiperator/api/v1alpha1/podtypes"
7
8
batchv1 "k8s.io/api/batch/v1"
8
9
corev1 "k8s.io/api/core/v1"
@@ -81,6 +82,14 @@ type SKIPJobSpec struct {
81
82
// +kubebuilder:validation:Required
82
83
Container ContainerSettings `json:"container"`
83
84
85
+ // IstioSettings are used to configure istio specific resources such as telemetry. Currently, adjusting sampling
86
+ // interval for tracing is the only supported option.
87
+ // By default, tracing is enabled with a random sampling percentage of 10%.
88
+ //
89
+ //+kubebuilder:validation:Optional
90
+ //+kubebuilder:default:={telemetry: {tracing: {{randomSamplingPercentage: 10}}}}
91
+ IstioSettings * istiotypes.IstioSettings `json:"istioSettings,omitempty"`
92
+
84
93
// Prometheus settings for pod running in job. Fields are identical to Application and if set,
85
94
// a podmonitoring object is created.
86
95
Prometheus * PrometheusConfig `json:"prometheus,omitempty"`
@@ -287,7 +296,8 @@ func (skipJob *SKIPJob) GetDefaultLabels() map[string]string {
287
296
288
297
func (skipJob * SKIPJob ) GetCommonSpec () * CommonSpec {
289
298
return & CommonSpec {
290
- GCP : skipJob .Spec .Container .GCP ,
291
- AccessPolicy : skipJob .Spec .Container .AccessPolicy ,
299
+ GCP : skipJob .Spec .Container .GCP ,
300
+ AccessPolicy : skipJob .Spec .Container .AccessPolicy ,
301
+ IstioSettings : skipJob .Spec .IstioSettings ,
292
302
}
293
303
}
0 commit comments