@@ -226,6 +226,7 @@ func (d *CommonDeployment) setTopologySpreadConstraints(pulp pulpv1.Pulp, pulpco
226226func (d * CommonDeployment ) setEnvVars (resources any , pulpcoreType settings.PulpcoreType ) {
227227 pulp := resources .(FunctionResources ).Pulp
228228 pulpcoreTypeField := reflect .ValueOf (pulp .Spec ).FieldByName (string (pulpcoreType ))
229+ ctx := resources .(FunctionResources ).Context
229230
230231 envVars := SetPulpcoreCustomEnvVars (* pulp , pulpcoreType )
231232
@@ -323,7 +324,7 @@ func (d *CommonDeployment) setEnvVars(resources any, pulpcoreType settings.Pulpc
323324 if pulp .Spec .SigningSecret != "" {
324325
325326 // for now, we are just dumping the error, but we should handle it
326- signingKeyFingerprint , _ := GetSigningKeyFingerprint (resources .(FunctionResources ).Client , pulp .Spec .SigningSecret , pulp .Namespace )
327+ signingKeyFingerprint , _ := GetSigningKeyFingerprint (ctx , resources .(FunctionResources ).Client , pulp .Spec .SigningSecret , pulp .Namespace )
327328
328329 signingKeyEnvVars := []corev1.EnvVar {
329330 {Name : "PULP_SIGNING_KEY_FINGERPRINT" , Value : signingKeyFingerprint },
@@ -744,6 +745,7 @@ func (d *CommonDeployment) setInitContainerResourceRequirements(pulp pulpv1.Pulp
744745// setReadinessProbe defines the container readinessprobe
745746func (d * CommonDeployment ) setReadinessProbe (resources any , pulp pulpv1.Pulp , pulpcoreType settings.PulpcoreType ) {
746747 readinessProbe := reflect .ValueOf (pulp .Spec ).FieldByName (string (pulpcoreType )).FieldByName ("ReadinessProbe" ).Interface ().(* corev1.Probe )
748+ ctx := resources .(FunctionResources ).Context
747749 switch pulpcoreType {
748750 case settings .API :
749751 if readinessProbe == nil {
@@ -752,7 +754,7 @@ func (d *CommonDeployment) setReadinessProbe(resources any, pulp pulpv1.Pulp, pu
752754 Exec : & corev1.ExecAction {
753755 Command : []string {
754756 "/usr/bin/readyz.py" ,
755- GetAPIRoot (resources .(FunctionResources ).Client , & pulp ) + "api/v3/status/" ,
757+ GetAPIRoot (ctx , resources .(FunctionResources ).Client , & pulp ) + "api/v3/status/" ,
756758 },
757759 },
758760 },
@@ -770,7 +772,7 @@ func (d *CommonDeployment) setReadinessProbe(resources any, pulp pulpv1.Pulp, pu
770772 Exec : & corev1.ExecAction {
771773 Command : []string {
772774 "/usr/bin/readyz.py" ,
773- GetContentPathPrefix (resources .(FunctionResources ).Client , & pulp ),
775+ GetContentPathPrefix (ctx , resources .(FunctionResources ).Client , & pulp ),
774776 },
775777 },
776778 },
@@ -806,14 +808,15 @@ func (d *CommonDeployment) setReadinessProbe(resources any, pulp pulpv1.Pulp, pu
806808// setReadinessProbe defines the container livenessprobe
807809func (d * CommonDeployment ) setLivenessProbe (resources any , pulp pulpv1.Pulp , pulpcoreType settings.PulpcoreType ) {
808810 livenessProbe := reflect .ValueOf (pulp .Spec ).FieldByName (string (pulpcoreType )).FieldByName ("LivenessProbe" ).Interface ().(* corev1.Probe )
811+ ctx := resources .(FunctionResources ).Context
809812 switch pulpcoreType {
810813 case settings .API :
811814 if livenessProbe == nil {
812815 livenessProbe = & corev1.Probe {
813816 FailureThreshold : 10 ,
814817 ProbeHandler : corev1.ProbeHandler {
815818 HTTPGet : & corev1.HTTPGetAction {
816- Path : GetAPIRoot (resources .(FunctionResources ).Client , & pulp ) + "api/v3/status/" ,
819+ Path : GetAPIRoot (ctx , resources .(FunctionResources ).Client , & pulp ) + "api/v3/status/" ,
817820 Port : intstr.IntOrString {
818821 IntVal : 24817 ,
819822 },
@@ -887,6 +890,7 @@ func (d *CommonDeployment) setInitContainers(resources any, pulp pulpv1.Pulp, pu
887890
888891// setGpgInitContainer returns the definition of a container used to store the gpg keys in the keyring
889892func setGpgInitContainer (resources any , pulp pulpv1.Pulp ) corev1.Container {
893+ ctx := resources .(FunctionResources ).Context
890894 volumeMounts := []corev1.VolumeMount {
891895 {
892896 Name : "gpg-keys" ,
@@ -922,7 +926,7 @@ func setGpgInitContainer(resources any, pulp pulpv1.Pulp) corev1.Container {
922926 },
923927 }
924928
925- signingKeyFingerprint , _ := GetSigningKeyFingerprint (resources .(FunctionResources ).Client , pulp .Spec .SigningSecret , pulp .Namespace )
929+ signingKeyFingerprint , _ := GetSigningKeyFingerprint (ctx , resources .(FunctionResources ).Client , pulp .Spec .SigningSecret , pulp .Namespace )
926930
927931 // env vars
928932 envVars := []corev1.EnvVar {{Name : "PULP_SIGNING_KEY_FINGERPRINT" , Value : signingKeyFingerprint }}
0 commit comments