-
Notifications
You must be signed in to change notification settings - Fork 10
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(selector): apply component labels/selectors #197
base: separate-db-storage
Are you sure you want to change the base?
fix(selector): apply component labels/selectors #197
Conversation
c773c04
to
8012924
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to update the NOTES.txt
for the port-forward case to include the component label.
export POD_NAME=$(kubectl get pods -n {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cryostat.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" --sort-by=.metadata.creationTimestamp -o jsonpath="{.items[-1:].metadata.name}") |
Otherwise, either the database or storage pod might also be selected.
6270a38
to
a7a598e
Compare
I think this change also fixes the helm test flakiness seen in #192. |
d24e798
to
e19d2c7
Compare
e19d2c7
to
c0932bd
Compare
@@ -38,7 +38,7 @@ | |||
``` | |||
kubectl -n {{ .Release.Namespace }} wait --for=condition=available --timeout=60s deploy/{{ include "cryostat.fullname" . }} | |||
|
|||
export POD_NAME=$(kubectl get pods -n {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cryostat.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" --sort-by=.metadata.creationTimestamp -o jsonpath="{.items[-1:].metadata.name}") | |||
export POD_NAME=$(kubectl get pods -n {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cryostat.name" . }},app.kubernetes.io/instance={{ .Release.Name }}",app.kubernetes.io/component=cryostat --sort-by=.metadata.creationTimestamp -o jsonpath="{.items[-1:].metadata.name}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the unit tests need updating after this change :D
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
{{- include "cryostat.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: cryostat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the selector is an immutable field, changes to this field do cause the upgrades (i.e. helm upgrade
) to fail. There is an option for helm upgrade --force
to force upgrade with replacement strategy with new objects. This seems pretty destructive though.
Any thoughts on this? It seems we can no longer test the upgrade path without --force
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related discussion: helm/helm#7082
@@ -13,4 +13,5 @@ spec: | |||
- port: {{ .Values.reports.service.httpPort }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The report's Service should also have label app.kubernetes.io/component: reports
for consistency?
Based on #191
Depends on #192
Fixes #194