Skip to content

Commit

Permalink
update golang ci lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecutalo committed Dec 15, 2023
1 parent 17e3781 commit 464c6df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/service/k8s/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func processObjProbe(objProbe *v1.Probe) *k8sapiv1.Probe {
if objProbe.ProbeHandler.HTTPGet != nil {
ObjProbeHTTPHeaders := make([]*k8sapiv1.HTTPHeader, 0, len(objProbe.ProbeHandler.HTTPGet.HTTPHeaders))
for _, value := range objProbe.ProbeHandler.HTTPGet.HTTPHeaders {
value := value
UniqueLivenessHeader := &k8sapiv1.HTTPHeader{
Name: &value.Name,
Value: &value.Value,
Expand Down Expand Up @@ -146,6 +147,7 @@ func processObjProbe(objProbe *v1.Probe) *k8sapiv1.Probe {
func ProtoForDeploymentSpec(deploymentSpec appsv1.DeploymentSpec) *k8sapiv1.Deployment_DeploymentSpec {
deploymentContainers := make([]*k8sapiv1.Deployment_DeploymentSpec_PodTemplateSpec_PodSpec_Container, 0, len(deploymentSpec.Template.Spec.Containers))
for _, container := range deploymentSpec.Template.Spec.Containers {
container := container
resourceLimits := make(map[string]string, len(container.Resources.Limits))
resourceRequests := make(map[string]string, len(container.Resources.Requests))

Expand Down Expand Up @@ -344,6 +346,7 @@ func setOptionalValue(source *int32, target *int32) {
func updateContainerProbes(deployment *appsv1.Deployment, fields *k8sapiv1.UpdateDeploymentRequest_Fields) error {
for _, containerProbes := range fields.ContainerProbes {
for _, container := range deployment.Spec.Template.Spec.Containers {
container := container
if container.Name == containerProbes.ContainerName {
if containerProbes.LivenessProbe != nil {
resourceProbe := containerProbes.LivenessProbe
Expand Down

0 comments on commit 464c6df

Please sign in to comment.