-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cron log #141
Cron log #141
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
nodejs 14.14.0 | ||
python 3.8.6 | ||
kubectl 1.18.0 | ||
kubectl 1.24.2 | ||
oc 4.7.5 | ||
helm 3.8.2 | ||
yarn 1.22.4 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,10 @@ service-acount-secret: | |
--from-literal=keycloak-url=${URL} \ | ||
--from-literal=client-id=script-cli \ | ||
--from-literal=client-secret=${CLIENTSECRET} | ||
|
||
.PHONY: service-acount-secret-gold-prod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems like a duplicate function with the one above: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done, though I left the check out, using |
||
service-acount-secret-gold-prod: | ||
kubectl create secret generic kc-cron-service-account -n "${NAMESPACE}" \ | ||
--from-literal=keycloak-url=${URL} \ | ||
--from-literal=client-id=viewer-cli \ | ||
--from-literal=client-secret=${CLIENTSECRET} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,24 @@ spec: | |
name: {{ .Chart.Name }} | ||
policyTypes: | ||
- Ingress | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have one network policy already; do we need another one or can just update the existing one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we need one for the cron job in the tools namespace to access patroni, and I believe we need one for the job in the prod namespace to access the tools patroni instance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm.. not clear.. did something not work without this Network policy? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the log job wasn't running for me until I added it. Once I did there were no more issues. Before I added the network police, the job would trigger, but the initdb step failed run. I made sure the credentials in prod and tools namespaces matched, but that didn't fix the issue. Only the network policy did. |
||
kind: NetworkPolicy | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: kc-cron-prod-access | ||
namespace: {{ .Values.networkPolicy.licensePlate }}-tools | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/instance: kc-cron-job | ||
ingress: | ||
- from: | ||
- podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: kc-cron-job | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we have this name dynamically so that it syncs up with other labels in cronjobx There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done, I did use the name override value since I believe that determines the pod names |
||
namespaceSelector: | ||
matchLabels: | ||
environment: prod | ||
name: {{ .Values.networkPolicy.licensePlate }} | ||
policyTypes: | ||
- Ingress |
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.
for readability, can we handle the edge case first and exit?
such as
so that it prevents the main logic is in a nested structure.
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.
done