Skip to content

Commit 6404361

Browse files
Merge pull request #2 from OpenBankingUK/AD-7269
Ad 7269
2 parents 479c125 + 29833e5 commit 6404361

16 files changed

+113
-77
lines changed

.gitlab-ci.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,32 @@ r.release:
127127
# |_| |_____|_| \_/_/ \_\______|
128128
################################################
129129

130-
clean-k8s:
130+
intel.clean-k8s:
131131
stage: final
132132
script:
133133
- ci_scripts/cleanup_kubernetes.sh
134134
when: always
135135

136-
delete-old-k8s:
136+
arm.clean-k8s:
137137
stage: final
138+
image: $RUNNER_IMAGE_AARCH64
139+
tags:
140+
- platform=aarch64
141+
script:
142+
- ci_scripts/cleanup_kubernetes.sh
143+
when: always
144+
145+
intel.delete-old-k8s:
146+
stage: final
147+
script:
148+
- ci_scripts/cleanup_old_kubernetes.sh
149+
when: always
150+
151+
arm.delete-old-k8s:
152+
stage: final
153+
image: $RUNNER_IMAGE_AARCH64
154+
tags:
155+
- platform=aarch64
138156
script:
139157
- ci_scripts/cleanup_old_kubernetes.sh
140158
when: always

charts/ping-devops/Chart.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
apiVersion: v2
55
name: ping-devops
66
########################################################################
7-
# 0.9.11 - Refer to http://helm.pingidentity.com/release-notes/currentRelease
7+
# 0.9.13 - Refer to http://helm.pingidentity.com/release-notes/currentRelease
88
########################################################################
9-
version: 0.9.11
10-
description: Ping Identity helm charts - 3/03/2023
9+
version: 0.9.13
10+
description: Ping Identity helm charts - 5/04/2023
1111
type: application
1212
home: https://helm.pingidentity.com/
1313
icon: https://helm.pingidentity.com/img/logos/ping.png
14-
appVersion: "2302"
14+
appVersion: "2304"

charts/ping-devops/templates/pingdirectory/cronjob.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ apiVersion: v1
1313
kind: ServiceAccount
1414
metadata:
1515
{{- include "pinglib.metadata.labels" $params | nindent 2 }}
16-
{{- include "pinglib.metadata.annotations" $params | nindent 2 -}}
16+
{{- include "pinglib.metadata.annotations" $params | nindent 2 }}
1717
name: {{ include "pinglib.fullname" $params }}-internal-kubectl
1818
---
1919
apiVersion: rbac.authorization.k8s.io/v1
2020
kind: Role
2121
metadata:
2222
{{- include "pinglib.metadata.labels" $params | nindent 2 }}
23-
{{- include "pinglib.metadata.annotations" $params | nindent 2 -}}
23+
{{- include "pinglib.metadata.annotations" $params | nindent 2 }}
2424
name: {{ include "pinglib.fullname" $params }}-modify-pods
2525
rules:
2626
- apiGroups: [""]
@@ -40,7 +40,7 @@ apiVersion: rbac.authorization.k8s.io/v1
4040
kind: RoleBinding
4141
metadata:
4242
{{- include "pinglib.metadata.labels" $params | nindent 2 }}
43-
{{- include "pinglib.metadata.annotations" $params | nindent 2 -}}
43+
{{- include "pinglib.metadata.annotations" $params | nindent 2 }}
4444
name: {{ include "pinglib.fullname" $params }}-modify-pods-to-sa
4545
subjects:
4646
- kind: ServiceAccount

charts/ping-devops/templates/pingdirectory/service-lb.yaml

-5
This file was deleted.

charts/ping-devops/templates/pinglib/_service-lb.tpl

-36
This file was deleted.

charts/ping-devops/templates/pinglib/_workload.tpl

+7-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ spec:
7474
affinity: {{ toYaml $v.container.affinity | nindent 8 }}
7575
schedulerName: {{ $v.workload.schedulerName }}
7676
shareProcessNamespace: {{ $v.workload.shareProcessNamespace }}
77-
topologySpreadConstraints: {{ toYaml $v.workload.topologySpreadConstraints | nindent 8 }}
77+
topologySpreadConstraints:
78+
{{- range $v.workload.topologySpreadConstraints }}
79+
- {{ . | toYaml | indent 8 | trim }}
80+
labelSelector:
81+
matchLabels:
82+
{{- include "pinglib.selector.labels" (list $top $v) | nindent 12 -}}
83+
{{- end }}
7884
enableServiceLinks: {{ $v.workload.enableServiceLinks }}
7985
initContainers:
8086
{{ include "pinglib.workload.init.waitfor" (concat . (list $v.container.waitFor "")) | nindent 6 }}

charts/ping-devops/values.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ global:
179179
# By default the images uses will be indicated by these
180180
# variables. An example might look like:
181181
#
182-
# pingidentity/pingdataconsole:2302 (February, 2023)
182+
# pingidentity/pingdataconsole:2304 (April, 2023)
183183
#
184184
# @param global.image.repository Default image registry
185185
# @desc is not the fully-qualified name of the image
@@ -195,7 +195,7 @@ global:
195195
# @desc Example: image.name: pingfederate
196196
#
197197
# @param global.image.tag Default image tag
198-
# @default 2302
198+
# @default 2304
199199
#
200200
# @param global.image.pullPolicy Default image pull policy
201201
# @default IfNotPresent
@@ -204,7 +204,7 @@ global:
204204
repository: pingidentity
205205
repositoryFqn:
206206
name:
207-
tag: "2302"
207+
tag: "2304"
208208
pullPolicy: IfNotPresent
209209

210210
############################################################
@@ -789,7 +789,7 @@ sidecars: {}
789789
# sidecars:
790790
# logger:
791791
# name: log-container
792-
# image: pingidentity/pingtoolkit:2302
792+
# image: pingidentity/pingtoolkit:2304
793793
# volumeMounts:
794794
# - mountPath: /tmp/logs/
795795
# name: logger
@@ -806,7 +806,7 @@ initContainers: {}
806806
# initContainers:
807807
# init-example:
808808
# name: 01-init
809-
# image: pingidentity/pingtoolkit:2302
809+
# image: pingidentity/pingtoolkit:2304
810810
# command: ['sh', '-c', 'echo "InitContainer 1"']
811811

812812
#############################################################
@@ -855,7 +855,7 @@ ldap-sdk-tools:
855855
name: ldap-sdk-tools
856856
repository: pingidentity
857857
repositoryFqn:
858-
tag: "2302"
858+
tag: "2304"
859859
pullPolicy: IfNotPresent
860860

861861
container:
@@ -1654,7 +1654,7 @@ pd-replication-timing:
16541654
name: pingtoolkit
16551655
repository: pingidentity
16561656
repositoryFqn:
1657-
tag: "2302"
1657+
tag: "2304"
16581658
pullPolicy: IfNotPresent
16591659

16601660
envs:
@@ -1676,7 +1676,7 @@ pingtoolkit:
16761676
name: pingtoolkit
16771677
repository: pingidentity
16781678
repositoryFqn:
1679-
tag: "2302"
1679+
tag: "2304"
16801680
pullPolicy: IfNotPresent
16811681

16821682
#############################################################

ci_scripts/cleanup_kubernetes.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CI_SCRIPTS_DIR="${CI_PROJECT_DIR:-.}/ci_scripts"
1919

2020
# Delete all namespaces with dbt-branch-pipeline-id-*
2121

22-
K8S_NS_PREFIX="dbt-${CI_COMMIT_REF_NAME}-${CI_PIPELINE_ID}"
22+
K8S_NS_PREFIX="dbt-${CI_COMMIT_REF_SLUG:-$USER}-${CI_PIPELINE_ID}"
2323

2424
banner "Cleaning any kubernetes namespaces starting with '${K8S_NS_PREFIX}'"
2525

ci_scripts/cleanup_old_kubernetes.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CI_SCRIPTS_DIR="${CI_PROJECT_DIR:-.}/ci_scripts"
1818
. "${CI_SCRIPTS_DIR}/ci_tools.lib.sh"
1919

2020
# Set how long till deletion
21-
three_days_ago=$(($(date +%s) - (3 * 24 * 60 * 60)))
21+
one_days_ago=$(($(date +%s) - (24 * 60 * 60)))
2222

2323
# Delete all namespaces with dbt-
2424
K8S_NS_PREFIX="dbt-"
@@ -33,7 +33,7 @@ banner "Deleting Namespaces ${_ns_candidates_to_delete}"
3333
for _ns in ${_ns_candidates_to_delete}; do
3434
# get the creation date of the ns and convert it into epoch
3535
ns_date=$(kubectl get ns "${_ns}" -o=json | jq -r ".metadata.creationTimestamp | strptime(\"%Y-%m-%dT%H:%M:%SZ\")|mktime")
36-
if test ${three_days_ago} -gt "${ns_date}"; then
36+
if test ${one_days_ago} -gt "${ns_date}"; then
3737
banner "Deleting namespace ${_ns}"
3838
kubectl delete ns --force=true --grace-period=0 "${_ns}"
3939
fi

ci_scripts/test_helm_template.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ def expectedValuesFound(actual, expected):
205205
if not expectedValuesFound(actual[key], expected[key]):
206206
return False
207207
elif type(expected[key]) is list:
208-
foundMatch = False
209208
# Try to find a match for each list element
210209
actualElements = list(actual[key])
211210
for expectedEl in expected[key]:
211+
foundMatch = False
212212
toRemove = None
213213
for actualEl in actualElements:
214214
if expectedValuesFound(actualEl, expectedEl):
@@ -219,8 +219,8 @@ def expectedValuesFound(actual, expected):
219219
# multiple values from the expected elements
220220
if toRemove:
221221
actualElements.remove(actualEl)
222-
if not foundMatch:
223-
return False
222+
if not foundMatch:
223+
return False
224224
else:
225225
simpleKeys.append(key)
226226
# Verify that the remaining non-list, non-dict items are a subset of the actual object

docs/config/supported-values.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ overridden by default (workloads, services, etc.).
3434
| `global.image.repository` | Default image registry is not the fully-qualified name of the image Example: image.repository: pingidentity, docker.io, 123.dkr.ecr.us-west-1.amazonaws.com | `pingidentity` |
3535
| `global.image.repositoryFqn` | Docker image repository fully-qualified name. Overrides image.repository and image.name on the pod image spec Example: image.repositoryFqn: pingidentity/pingfederate, docker.io/my-pingfederate | |
3636
| `global.image.name` | Default image name MUST be set in child chart Example: image.name: pingfederate | |
37-
| `global.image.tag` | Default image tag | `2302` |
37+
| `global.image.tag` | Default image tag | `2304` |
3838
| `global.image.pullPolicy` | Default image pull policy | `IfNotPresent` |
3939
| `global.rbac.generateServiceAccount` | Set to true to generate a service account for the workload. | `false` |
4040
| `global.rbac.serviceAccountName` | Name of the service account that will be generated. The default value of "_defaultServiceAccountName_" will result in a service account named based on the Helm installation and the specific workload being deployed. If generateServiceAccount and generateGlobalServiceAccount are false, this value can also refer to a service account created outside of Helm. | `_defaultServiceAccountName_` |

docs/index.yaml

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
apiVersion: v1
22
entries:
33
ping-devops:
4+
- apiVersion: v2
5+
appVersion: "2304"
6+
created: "2023-05-04T16:40:21.09632-05:00"
7+
description: Ping Identity helm charts - 5/04/2023
8+
digest: 6c3d38dc89b254f411f375e4e4d4b7bc3c86ad8d0056dff7f3b01bc427a87e26
9+
home: https://helm.pingidentity.com/
10+
icon: https://helm.pingidentity.com/img/logos/ping.png
11+
name: ping-devops
12+
type: application
13+
urls:
14+
- https://github.com/pingidentity/helm-charts/releases/download/ping-devops-0.9.13/ping-devops-0.9.13.tgz
15+
version: 0.9.13
16+
- apiVersion: v2
17+
appVersion: "2303"
18+
created: "2023-04-03T15:02:33.069256-05:00"
19+
description: Ping Identity helm charts - 4/03/2023
20+
digest: 0245d11e2115a182ba3b7c68fe491e38d81f553b55323534112738774510c0ce
21+
home: https://helm.pingidentity.com/
22+
icon: https://helm.pingidentity.com/img/logos/ping.png
23+
name: ping-devops
24+
type: application
25+
urls:
26+
- https://github.com/pingidentity/helm-charts/releases/download/ping-devops-0.9.12/ping-devops-0.9.12.tgz
27+
version: 0.9.12
428
- apiVersion: v2
529
appVersion: "2302"
630
created: "2023-03-03T09:32:22.035384-06:00"
@@ -948,4 +972,4 @@ entries:
948972
urls:
949973
- https://github.com/pingidentity/helm-charts/releases/download/ping-devops-0.2.0/ping-devops-0.2.0.tgz
950974
version: 0.2.0
951-
generated: "2023-03-03T09:32:22.030215-06:00"
975+
generated: "2023-05-04T16:40:21.090967-05:00"

docs/release-notes/currentRelease.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Release Notes
2-
## Release 0.9.11 (March 03, 2023)
2+
## Release 0.9.13 (May 04, 2023)
33
### Features ###
4-
- Updated default global image tag to `2302`.
5-
- Added default environment variables to `pingdirectoryproxy` to support joining a PingDirectory topology.
4+
- Updated default global image tag to `2304`.

docs/release-notes/previousReleases.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# Release Notes
2+
## Release 0.9.12 (April 03, 2023)
3+
### Features ###
4+
- Updated default global image tag to `2303`.
5+
- Updated the workload `topologySpreadConstraints` field to automatically set `matchLabels` to match the workload labels.
6+
7+
## Release 0.9.11 (March 03, 2023)
8+
### Features ###
9+
- Updated default global image tag to `2302`.
10+
- Added default environment variables to `pingdirectoryproxy` to support joining a PingDirectory topology.
11+
212
## Release 0.9.10 (February 03, 2023)
313
### Features ###
414
- Updated default global image tag to `2301`.

helm-tests/template-tests/topologySpreadConstraints.yaml

+25-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ global:
1515
- maxSkew: 1
1616
topologyKey: node
1717
whenUnsatisfiable: ScheduleAnyway
18-
matchLabels:
19-
foo: bar
18+
- maxSkew: 2
19+
topologyKey: node2
20+
whenUnsatisfiable: ScheduleAnyway
21+
- maxSkew: 3
22+
topologyKey: node3
23+
whenUnsatisfiable: ScheduleAnyway
2024
### SECTION:EXPECTED ###
2125
# Validate that topologySpreadConstraints is set in the PDC Deployment
2226
apiVersion: apps/v1
@@ -27,9 +31,25 @@ spec:
2731
template:
2832
spec:
2933
topologySpreadConstraints:
30-
- maxSkew: 1
34+
- labelSelector:
35+
matchLabels:
36+
app.kubernetes.io/instance: topologytest
37+
app.kubernetes.io/name: pingdataconsole
38+
maxSkew: 1
3139
topologyKey: node
3240
whenUnsatisfiable: ScheduleAnyway
33-
matchLabels:
34-
foo: bar
41+
- labelSelector:
42+
matchLabels:
43+
app.kubernetes.io/instance: topologytest
44+
app.kubernetes.io/name: pingdataconsole
45+
maxSkew: 2
46+
topologyKey: node2
47+
whenUnsatisfiable: ScheduleAnyway
48+
- labelSelector:
49+
matchLabels:
50+
app.kubernetes.io/instance: topologytest
51+
app.kubernetes.io/name: pingdataconsole
52+
maxSkew: 3
53+
topologyKey: node3
54+
whenUnsatisfiable: ScheduleAnyway
3555
---

helm-tests/template-tests/utilitySidecar.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ spec:
6969
volumeMounts:
7070
- mountPath: /tmp
7171
name: temp
72-
- mountPath: /opt/in/file.txt
72+
- mountPath: /opt/in/script.sh
7373
name: test-cm
74-
subPath: file.txt
74+
subPath: script.sh
7575
securityContext:
7676
fsGroup: 0
7777
runAsGroup: 0

0 commit comments

Comments
 (0)