Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated devtron-reference-chart directory #2603

Merged
merged 7 commits into from
Nov 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions pkg/app/AppService.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ func (impl AppServiceImpl) createArgoApplicationIfRequired(appId int, appName st
if err != nil {
return "", err
}
//update cd pipeline to mark deployment app created
_, err = impl.updatePipeline(pipeline, userId)
if err != nil {
impl.logger.Errorw("error in update cd pipeline for deployment app created or not", "err", err)
return "", err
}
return argoAppName, nil
}
}
Expand Down Expand Up @@ -943,7 +949,7 @@ func (impl AppServiceImpl) TriggerRelease(overrideRequest *bean.ValuesOverrideRe

// ACD app creation STARTS HERE, it will use existing if already created
impl.logger.Debugw("new pipeline found", "pipeline", pipeline)
name, err := impl.createArgoApplicationIfRequired(overrideRequest.AppId, pipeline.App.AppName, envOverride, pipeline, deployedBy)
name, err := impl.createArgoApplicationIfRequired(overrideRequest.AppId, pipeline.App.AppName, envOverride, pipeline, overrideRequest.UserId)
if err != nil {
impl.logger.Errorw("acd application create error on cd trigger", "err", err, "req", overrideRequest)
return 0, err
Expand Down Expand Up @@ -1039,13 +1045,6 @@ func (impl AppServiceImpl) TriggerRelease(overrideRequest *bean.ValuesOverrideRe
}
}

//update cd pipeline to mark deployment app created
_, err = impl.updatePipeline(pipeline, overrideRequest.UserId)
if err != nil {
impl.logger.Errorw("error in update cd pipeline for deployment app created or not", "err", err)
return 0, err
}

go impl.WriteCDTriggerEvent(overrideRequest, pipeline, envOverride, materialInfoMap, artifact, releaseId, pipelineOverrideId)
if artifact.ScanEnabled {
_ = impl.MarkImageScanDeployed(overrideRequest.AppId, envOverride.TargetEnvironment, artifact.ImageDigest, pipeline.Environment.ClusterId)
Expand Down Expand Up @@ -1931,6 +1930,12 @@ func (impl AppServiceImpl) createHelmAppForCdPipeline(overrideRequest *bean.Valu
return false, err
}
isSuccess = helmResponse.Success
//update cd pipeline to mark deployment app created
_, err = impl.updatePipeline(pipeline, overrideRequest.UserId)
if err != nil {
impl.logger.Errorw("error in update cd pipeline for deployment app created or not", "err", err)
return false, err
}
}

// update deployment status, used in deployment history
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand All @@ -338,7 +348,7 @@
"items": {},
"description": "contains the commands",
"title": "Value"
}
}
}
},
"containers": {
Expand Down Expand Up @@ -462,6 +472,12 @@
}
}
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand Down Expand Up @@ -464,6 +474,12 @@
}
}
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -42,6 +43,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
Expand Down Expand Up @@ -75,6 +77,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingressInternal.hosts }}
{{- range .Values.ingressInternal.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -86,6 +89,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingressInternal.tls }}
tls:
{{ toYaml .Values.ingressInternal.tls | indent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand All @@ -338,7 +348,7 @@
"items": {},
"description": "contains the commands",
"title": "Value"
}
}
}
},
"containers": {
Expand Down Expand Up @@ -464,6 +474,12 @@
}
}
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -42,6 +43,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
Expand Down Expand Up @@ -75,6 +77,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingressInternal.hosts }}
{{- range .Values.ingressInternal.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -86,6 +89,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingressInternal.tls }}
tls:
{{ toYaml .Values.ingressInternal.tls | indent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand Down Expand Up @@ -464,6 +474,12 @@
}
}
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -45,6 +46,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
Expand Down Expand Up @@ -78,6 +80,7 @@ spec:
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- if .Values.ingressInternal.hosts }}
{{- range .Values.ingressInternal.hosts }}
- host: {{ .host | quote }}
http:
Expand All @@ -89,6 +92,7 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingressInternal.tls }}
tls:
{{ toYaml .Values.ingressInternal.tls | indent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand Down Expand Up @@ -462,6 +472,12 @@
}
}
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@
"description": "used for enabling/disabling autoscaling",
"title": "Enabled"
},
"labels": {
"type": "object",
"description": "labels for HPA",
"title": "labels"
},
"annotations": {
"type": "object",
"description": "used to configure some options for HPA",
"title": "annotations"
},
"extraMetrics": {
"type": "array",
"items": {},
Expand All @@ -321,7 +331,13 @@
"items": {},
"description": "contains the commands",
"title": "Value"
}
},
"workingDir": {
"type": "object",
"items": {},
"description": "contains the working directory",
"title": "Working directory"
}
}
},
"containers": {
Expand Down Expand Up @@ -437,6 +453,12 @@
"title": "Ingress class name",
"default": "nginx"
},
"labels": {
"type": "object",
"description": "labels for ingress",
"title": "Ingress labels",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "used to enable or disable ingress",
Expand Down
Loading