Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
+ some sources
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Oct 5, 2023
1 parent ed4ea5a commit f70f7c4
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 1 deletion.
92 changes: 92 additions & 0 deletions helm/producer-rss/templates/cronjob-elementy-ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
app: "producer-rss"
name: "{{ include "producerRss.fullname" . }}-elementy-ru"
spec:
schedule: "0 5 * * *"
jobTemplate:
spec:
template:
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: "{{ include "producerRss.fullname" . }}-elementy-ru"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
env:
- name: API_WRITER_BACKOFF
value: "{{ .Values.api.writer.backoff }}"
- name: API_WRITER_URI
value: "{{ .Values.api.writer.uri }}"
- name: DB_URI
value: "{{ .Values.db.protocol }}://{{ .Values.db.hostname }}/?retryWrites=true&w=majority"
- name: DB_NAME
value: {{ .Values.db.name }}
- name: DB_USERNAME
value: {{ .Values.db.username }}
{{- if .Values.db.password.secret.enabled }}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Values.db.password.secret.name }}"
key: "{{ .Values.db.password.secret.key }}"
{{- else }}
- name: DB_PASSWORD
value: "{{ .Values.db.password.raw }}"
{{- end }}
- name: DB_TABLE_NAME
value: {{ .Values.db.table.name }}
- name: DB_TLS_ENABLED
value: "{{ .Values.db.tls.enabled }}"
- name: DB_TLS_INSECURE
value: "{{ .Values.db.tls.insecure }}"
- name: LOG_LEVEL
value: "{{ .Values.log.level }}"
- name: FEED_URL
value: "https://elementy.ru/rss/news"
- name: FEED_TLS_SKIP_VERIFY
value: "{{ .Values.feed.tls.skipVerify }}"
- name: FEED_UPDATE_INTERVAL_MIN
value: "{{ .Values.feed.updateInterval.min }}"
- name: FEED_UPDATE_INTERVAL_MAX
value: "{{ .Values.feed.updateInterval.max }}"
- name: FEED_UPDATE_TIMEOUT
value: "{{ .Values.feed.updateTimeout }}"
- name: FEED_USER_AGENT
value: "{{ .Values.feed.userAgent }}"
- name: MSG_MD_KEY_FEED_CATEGORIES
value: "{{ .Values.message.metadata.key.feedCategories }}"
- name: MSG_MD_KEY_FEED_DESCRIPTION
value: "{{ .Values.message.metadata.key.feedDescription }}"
- name: MSG_MD_KEY_FEED_IMAGE_TITLE
value: "{{ .Values.message.metadata.key.feedImageTitle }}"
- name: MSG_MD_KEY_FEED_IMAGE_URL
value: "{{ .Values.message.metadata.key.feedImageUrl }}"
- name: MSG_MD_KEY_FEED_TITLE
value: "{{ .Values.message.metadata.key.feedTitle }}"
- name: MSG_MD_KEY_AUTHOR
value: "{{ .Values.message.metadata.key.author }}"
- name: MSG_MD_KEY_CATEGORIES
value: "{{ .Values.message.metadata.key.categories }}"
- name: MSG_MD_KEY_GUID
value: "{{ .Values.message.metadata.key.guid }}"
- name: MSG_MD_KEY_IMAGE_TITLE
value: "{{ .Values.message.metadata.key.imageTitle }}"
- name: MSG_MD_KEY_IMAGE_URL
value: "{{ .Values.message.metadata.key.imageUrl }}"
- name: MSG_MD_KEY_LANGUAGE
value: "{{ .Values.message.metadata.key.language }}"
- name: MSG_MD_KEY_SUMMARY
value: "{{ .Values.message.metadata.key.summary }}"
- name: MSG_MD_KEY_TITLE
value: "{{ .Values.message.metadata.key.title }}"
- name: MSG_MD_SPEC_VERSION
value: "{{ .Values.message.metadata.specVersion }}"
- name: MSG_CONTENT_TYPE
value: "{{ .Values.message.content.type }}"
restartPolicy: OnFailure
92 changes: 92 additions & 0 deletions helm/producer-rss/templates/cronjob-nplus1-ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
app: "producer-rss"
name: "{{ include "producerRss.fullname" . }}-nplus1-ru"
spec:
schedule: "0 * * * *"
jobTemplate:
spec:
template:
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: "{{ include "producerRss.fullname" . }}-nplus1-ru"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
env:
- name: API_WRITER_BACKOFF
value: "{{ .Values.api.writer.backoff }}"
- name: API_WRITER_URI
value: "{{ .Values.api.writer.uri }}"
- name: DB_URI
value: "{{ .Values.db.protocol }}://{{ .Values.db.hostname }}/?retryWrites=true&w=majority"
- name: DB_NAME
value: {{ .Values.db.name }}
- name: DB_USERNAME
value: {{ .Values.db.username }}
{{- if .Values.db.password.secret.enabled }}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Values.db.password.secret.name }}"
key: "{{ .Values.db.password.secret.key }}"
{{- else }}
- name: DB_PASSWORD
value: "{{ .Values.db.password.raw }}"
{{- end }}
- name: DB_TABLE_NAME
value: {{ .Values.db.table.name }}
- name: DB_TLS_ENABLED
value: "{{ .Values.db.tls.enabled }}"
- name: DB_TLS_INSECURE
value: "{{ .Values.db.tls.insecure }}"
- name: LOG_LEVEL
value: "{{ .Values.log.level }}"
- name: FEED_URL
value: "https://nplus1.ru/rss"
- name: FEED_TLS_SKIP_VERIFY
value: "{{ .Values.feed.tls.skipVerify }}"
- name: FEED_UPDATE_INTERVAL_MIN
value: "{{ .Values.feed.updateInterval.min }}"
- name: FEED_UPDATE_INTERVAL_MAX
value: "{{ .Values.feed.updateInterval.max }}"
- name: FEED_UPDATE_TIMEOUT
value: "{{ .Values.feed.updateTimeout }}"
- name: FEED_USER_AGENT
value: "{{ .Values.feed.userAgent }}"
- name: MSG_MD_KEY_FEED_CATEGORIES
value: "{{ .Values.message.metadata.key.feedCategories }}"
- name: MSG_MD_KEY_FEED_DESCRIPTION
value: "{{ .Values.message.metadata.key.feedDescription }}"
- name: MSG_MD_KEY_FEED_IMAGE_TITLE
value: "{{ .Values.message.metadata.key.feedImageTitle }}"
- name: MSG_MD_KEY_FEED_IMAGE_URL
value: "{{ .Values.message.metadata.key.feedImageUrl }}"
- name: MSG_MD_KEY_FEED_TITLE
value: "{{ .Values.message.metadata.key.feedTitle }}"
- name: MSG_MD_KEY_AUTHOR
value: "{{ .Values.message.metadata.key.author }}"
- name: MSG_MD_KEY_CATEGORIES
value: "{{ .Values.message.metadata.key.categories }}"
- name: MSG_MD_KEY_GUID
value: "{{ .Values.message.metadata.key.guid }}"
- name: MSG_MD_KEY_IMAGE_TITLE
value: "{{ .Values.message.metadata.key.imageTitle }}"
- name: MSG_MD_KEY_IMAGE_URL
value: "{{ .Values.message.metadata.key.imageUrl }}"
- name: MSG_MD_KEY_LANGUAGE
value: "{{ .Values.message.metadata.key.language }}"
- name: MSG_MD_KEY_SUMMARY
value: "{{ .Values.message.metadata.key.summary }}"
- name: MSG_MD_KEY_TITLE
value: "{{ .Values.message.metadata.key.title }}"
- name: MSG_MD_SPEC_VERSION
value: "{{ .Values.message.metadata.specVersion }}"
- name: MSG_CONTENT_TYPE
value: "{{ .Values.message.content.type }}"
restartPolicy: OnFailure
2 changes: 1 addition & 1 deletion helm/producer-rss/templates/cronjob-yle-fi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app: "producer-rss"
name: "{{ include "producerRss.fullname" . }}-yle-fi"
spec:
schedule: "29/29 * * * *"
schedule: "29 * * * *"
jobTemplate:
spec:
template:
Expand Down

0 comments on commit f70f7c4

Please sign in to comment.