Skip to content

Commit

Permalink
Merge pull request #788 from intershop/release/develop/icm
Browse files Browse the repository at this point in the history
Release icm-as:minor icm-web:minor
  • Loading branch information
khauser authored Aug 12, 2024
2 parents 0b8fb4b + a53df25 commit 232f36f
Show file tree
Hide file tree
Showing 30 changed files with 441 additions and 174 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint-test_icm-web-unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Unit test icm-web chart"
on:
pull_request:
paths:
- "charts/icm-web/**"

jobs:
lint-test-icm-web-unittest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Base
uses: ./.github/template/base
- name: Unit test
uses: ./.github/template/unittest
with:
chartTestingFile: ct_icm-web.yaml
chartName: icm-web
2 changes: 1 addition & 1 deletion charts/icm-as/.bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "2.0.3"
current_version = "2.1.0"

[[tool.bumpversion.files]]
filename = "Chart.yaml"
Expand Down
16 changes: 16 additions & 0 deletions charts/icm-as/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@

<a name="icm-as-2.1.0"></a>
## [icm-as-2.1.0](https://github.com/intershop/helm-charts/compare/icm-as-2.0.3...icm-as-2.1.0)

> 2024-08-12
### Chore

* bump versions of icm-as:minor icm-web:minor

### Feat

* **icm:** WAA and WA doesn't share pagecache directory in case of emptydir is configured and New Relic ([#785](https://github.com/intershop/helm-charts/issues/785), [#786](https://github.com/intershop/helm-charts/issues/786))
* **icm:** allow shutdown via replicas=0 definition ([#787](https://github.com/intershop/helm-charts/issues/787))


<a name="icm-as-2.0.3"></a>
## [icm-as-2.0.3](https://github.com/intershop/helm-charts/compare/icm-as-2.0.2...icm-as-2.0.3)

> 2024-07-17
### Chore

* generated changelog+release notes for icm-as:patch
* bump versions of icm-as:patch

### Fix
Expand Down
2 changes: 1 addition & 1 deletion charts/icm-as/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
# name and version must be in this exact order, otherwise bump2version won't work
name: icm-as
version: 2.0.3
version: 2.1.0
description: Intershop Commerce Management - AppServer
type: application
appVersion: 11.10.3-LTS
13 changes: 7 additions & 6 deletions charts/icm-as/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

<a name="icm-as-2.0.3"></a>
## [icm-as-2.0.3](https://github.com/intershop/helm-charts/compare/icm-as-2.0.2...icm-as-2.0.3)
<a name="icm-as-2.1.0"></a>
## [icm-as-2.1.0](https://github.com/intershop/helm-charts/compare/icm-as-2.0.3...icm-as-2.1.0)

> 2024-07-17
> 2024-08-12
### Chore

* bump versions of icm-as:patch
* bump versions of icm-as:minor icm-web:minor

### Fix
### Feat

* **icm:** the jgroups now has its own sc ([#751](https://github.com/intershop/helm-charts/issues/751)) ([#758](https://github.com/intershop/helm-charts/issues/758))
* **icm:** WAA and WA doesn't share pagecache directory in case of emptydir is configured and New Relic ([#785](https://github.com/intershop/helm-charts/issues/785), [#786](https://github.com/intershop/helm-charts/issues/786))
* **icm:** allow shutdown via replicas=0 definition ([#787](https://github.com/intershop/helm-charts/issues/787))

26 changes: 12 additions & 14 deletions charts/icm-as/templates/_operationalContext.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@ Renders values from the operational context
{{- .Values.operationalContext.environmentName | default (include "icm-as.environmentType" .) -}}
{{- end -}}

{{- define "icm-as.applicationType" -}}
{{- define "icm-as.stagingType" -}}
{{- include "icm-as.operationalContext" . -}}
{{- .Values.operationalContext.applicationType | default "icm" -}}
{{- if .Values.replication.enabled -}}
{{- if eq .Values.replication.role "source" -}}
{{- $_ := set .Values.operationalContext "stagingType" "edit" -}}
{{- else -}}
{{- $_ := set .Values.operationalContext "stagingType" "live" -}}
{{- end -}}
{{- else -}}
{{- .Values.operationalContext.stagingType | default "standalone" -}}
{{- end -}}
{{- end -}}

{{/*
Expand All @@ -31,17 +39,7 @@ Renders the operational context name
{{- define "icm-as.operationalContextName" -}}
{{- include "icm-as.operationalContext" . -}}
{{- $customerId := .Values.operationalContext.customerId | default "n_a" -}}
{{- $environmentType := include "icm-as.environmentType" . -}}
{{- $environmentName := include "icm-as.environmentName" . -}}
{{- $applicationType := include "icm-as.applicationType" . -}}
{{/* stagingType calculation differs from icm-web */}}
{{- $_ := set .Values.operationalContext "stagingType" "standalone" -}}
{{- if .Values.replication.enabled -}}
{{- if eq .Values.replication.role "source" -}}
{{- $_ := set .Values.operationalContext "stagingType" "edit" -}}
{{- else -}}
{{- $_ := set .Values.operationalContext "stagingType" "live" -}}
{{- end -}}
{{- end -}}
{{- printf "%s-%s-%s-%s" $customerId $environmentName $applicationType .Values.operationalContext.stagingType -}}
{{- $stagingType := include "icm-as.stagingType" . -}}
{{- printf "%s-%s-%s" $customerId $environmentName $stagingType -}}
{{- end -}}
7 changes: 6 additions & 1 deletion charts/icm-as/templates/as-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@ metadata:
app: {{ include "icm-as.fullname" .}}
spec:
progressDeadlineSeconds: 600
replicas: {{ .Values.replicaCount | default 1 }}
replicas: {{ .Values.replicaCount | default 0 }}
revisionHistoryLimit: 10
selector:
matchLabels:
app: icm-as
release: {{ include "icm-as.fullname" . }}
{{- if (ne (int .Values.replicaCount) 0) }}
strategy:
type: {{ .Values.updateStrategy | default "RollingUpdate" }}
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
{{- end }}
template:
metadata:
{{- include "icm-as.podData" . | nindent 6 }}
labels:
app: icm-as
release: {{ include "icm-as.fullname" . }}
environment-name: "{{ include "icm-as.environmentName" . }}"
environment-type: "{{ include "icm-as.environmentType" . }}"
operational-context: "{{ include "icm-as.operationalContextName" . }}"
{{- include "icm-as.podLabels" . | nindent 8 }}
{{- if include "icm-as.podBinding" . }}
{{- include "icm-as.podBinding" . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/icm-as/templates/config-newrelic-yaml-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
data:
newrelic.yml: |-
common: &default_settings
app_name : "{{ .Values.newrelic.appName | default (.Values.newrelic.app_name | default (include "icm-as.operationalContextName" .)) }}"
app_name : "{{ (include "icm-as.operationalContextName" .) }}-icm-as"
{{- end -}}
2 changes: 1 addition & 1 deletion charts/icm-as/tests/default-values_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tests:
value: prd
- equal:
path: metadata.labels.operational-context
value: n_a-prd-icm-standalone
value: n_a-prd-standalone
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: icm-as
Expand Down
39 changes: 2 additions & 37 deletions charts/icm-as/tests/newrelic_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ tests:
of: ConfigMap
- matchRegex:
path: data["newrelic.yml"]
pattern: ".*(app_name : \"n_a-int_01-icm-standalone\").*"
pattern: '.*(app_name : "n_a-int_01-standalone-icm-as").*'
- it: newrelic custom appName
release:
name: icm-as
Expand All @@ -169,39 +169,4 @@ tests:
of: ConfigMap
- matchRegex:
path: data["newrelic.yml"]
pattern: ".*(app_name : \"icm\").*"
- it: newrelic custom deprecated app_name
release:
name: icm-as
chart:
version: 0.8.15
values:
- ../values.yaml
set:
newrelic.enabled: true
newrelic.app_name: icm
template: templates/config-newrelic-yaml-cm.yaml
asserts:
- isKind:
of: ConfigMap
- matchRegex:
path: data["newrelic.yml"]
pattern: ".*(app_name : \"icm\").*"
- it: newrelic custom appName with precedence over deprecated app_name
release:
name: icm-as
chart:
version: 0.8.15
values:
- ../values.yaml
set:
newrelic.enabled: true
newrelic.app_name: icm-deprecate-name
newrelic.appName: icm
template: templates/config-newrelic-yaml-cm.yaml
asserts:
- isKind:
of: ConfigMap
- matchRegex:
path: data["newrelic.yml"]
pattern: ".*(app_name : \"icm\").*"
pattern: '.*(app_name : "n_a-prd-standalone-icm-as").*'
7 changes: 1 addition & 6 deletions charts/icm-as/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ newrelic:
# enable or disable the New Relic Java agent to monitor the icm-as JVM
# https://docs.newrelic.com/docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/link-apm-applications-kubernetes/
enabled: false
# application name (~= environment name): calculated from operationalContext section, set to override
# "app_name" deprecated since ICM-AS Helm Charts 1.9.0, will be removed in a future version. Use appName instead.
# appName: "icm"
# provide license key as plain text
# "license_key" deprecated since ICM-AS Helm Charts 1.8.0, will be removed in a future version.
# Use licenseKeySecretKeyRef instead.
Expand All @@ -106,13 +103,11 @@ fullnameOverride: ""
# operational context (~= environment) this icm is running in
operationalContext:
# id of the customer e.g. xxxxx
# customerId: <customerId>
customerId: "n_a"
# type of the environment (one of {int,uat,prd}, default=prd)
environmentType: prd
# name of the environment (environment-type + some sort of id, e.g. int-01, default=<environmentType>)
environmentName: prd
# type of the application (default=icm)
applicationType: icm

# provide custom cluster config from "icm-as.fullname"-system-conf-cluster configmap
provideCustomConfig:
Expand Down
2 changes: 1 addition & 1 deletion charts/icm-replication/.bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "2.4.0"
current_version = "2.5.0"

[[tool.bumpversion.files]]
filename = "Chart.yaml"
Expand Down
6 changes: 3 additions & 3 deletions charts/icm-replication/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ appVersion: "11.9.0"
description: Intershop Commerce Management - ICM Replication
# name and version must be in this exact order, otherwise bump2version won't work
name: icm-replication
version: 2.4.0
version: 2.5.0
annotations:
requestedMemoryQuota: 9Gi
requestedCpuQuotaInMinutes: 3000
dependencies:
- name: icm
version: 2.4.0
version: 2.5.0
repository: file://../icm
alias: icm-live
- name: icm
version: 2.4.0
version: 2.5.0
repository: file://../icm
alias: icm-edit
2 changes: 1 addition & 1 deletion charts/icm-web/.bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.11.0"
current_version = "0.12.0"

[[tool.bumpversion.files]]
filename = "Chart.yaml"
Expand Down
16 changes: 16 additions & 0 deletions charts/icm-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@

<a name="icm-web-0.12.0"></a>
## [icm-web-0.12.0](https://github.com/intershop/helm-charts/compare/icm-web-0.11.0...icm-web-0.12.0)

> 2024-08-12
### Chore

* bump versions of icm-as:minor icm-web:minor

### Feat

* **icm:** WAA and WA doesn't share pagecache directory in case of emptydir is configured and New Relic ([#785](https://github.com/intershop/helm-charts/issues/785), [#786](https://github.com/intershop/helm-charts/issues/786))
* **icm:** allow shutdown via replicas=0 definition ([#787](https://github.com/intershop/helm-charts/issues/787))


<a name="icm-web-0.11.0"></a>
## [icm-web-0.11.0](https://github.com/intershop/helm-charts/compare/icm-web-0.10.0...icm-web-0.11.0)

> 2024-07-24
### Chore

* generated changelog+release notes for icm-web:minor
* bump versions of icm-web:minor

### Feat
Expand Down
2 changes: 1 addition & 1 deletion charts/icm-web/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: "11.0.13"
description: Intershop Commerce Management - Web Adapter and Web Adapter Agent
# name and version must be in this exact order, otherwise bump2version won't work
name: icm-web
version: 0.11.0
version: 0.12.0
11 changes: 6 additions & 5 deletions charts/icm-web/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

<a name="icm-web-0.11.0"></a>
## [icm-web-0.11.0](https://github.com/intershop/helm-charts/compare/icm-web-0.10.0...icm-web-0.11.0)
<a name="icm-web-0.12.0"></a>
## [icm-web-0.12.0](https://github.com/intershop/helm-charts/compare/icm-web-0.11.0...icm-web-0.12.0)

> 2024-07-24
> 2024-08-12
### Chore

* bump versions of icm-web:minor
* bump versions of icm-as:minor icm-web:minor

### Feat

* **icm:** Configurable access to internal WA endpoints
* **icm:** WAA and WA doesn't share pagecache directory in case of emptydir is configured and New Relic ([#785](https://github.com/intershop/helm-charts/issues/785), [#786](https://github.com/intershop/helm-charts/issues/786))
* **icm:** allow shutdown via replicas=0 definition ([#787](https://github.com/intershop/helm-charts/issues/787))

37 changes: 37 additions & 0 deletions charts/icm-web/templates/_operationalContext.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Renders values from the operational context
*/}}

{{- define "icm-web.operationalContext" -}}
{{- if not .Values.operationalContext -}}
{{- $_ := set .Values "operationalContext" dict -}}
{{- end -}}
{{- end -}}

{{- define "icm-web.environmentType" -}}
{{- include "icm-web.operationalContext" . -}}
{{- .Values.operationalContext.environmentType | default "prd" -}}
{{- end -}}

{{- define "icm-web.environmentName" -}}
{{- include "icm-web.operationalContext" . -}}
{{- .Values.operationalContext.environmentName | default (include "icm-web.environmentType" .) -}}
{{- end -}}

{{- define "icm-web.stagingType" -}}
{{- include "icm-web.operationalContext" . -}}
{{- .Values.operationalContext.stagingType | default "standalone" -}}
{{- end -}}

{{/*
Renders the operational context name
*/}}
{{- define "icm-web.operationalContextName" -}}
{{- include "icm-web.operationalContext" . -}}
{{- $customerId := .Values.operationalContext.customerId | default "n_a" -}}
{{- $environmentName := include "icm-web.environmentName" . -}}
{{- $stagingType := include "icm-web.stagingType" . -}}
{{- printf "%s-%s-%s" $customerId $environmentName $stagingType -}}
{{- end -}}
Loading

0 comments on commit 232f36f

Please sign in to comment.