[flatpak-indexer] Separate quay.io instance
All checks were successful
Linter / yamllint (pull_request) Successful in 28s
Linter / ansible-lint (pull_request) Successful in 1m32s

This is another try to separate the quay.io instance for
flatpak-indexer.
See more info in infra/tickets#11543

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2026-06-29 17:10:28 +02:00
commit 3f29b12df6
4 changed files with 222 additions and 9 deletions

View file

@ -0,0 +1,89 @@
redis_url: ${REDIS_URL}
redis_password: ${REDIS_PASSWORD}
koji_config: fedora
deltas_dir: ${OUTPUT_DIR}/deltas/
icons_dir: ${OUTPUT_DIR}/icons/
{% if env == 'staging' %}
deltas_uri: https://quay.io/fedora-testing/flatpak/deltas/
icons_uri: https://quay.io/fedora-testing/flatpak/app-icons/
{% else %}
deltas_uri: https://quay.io/fedora/flatpak/deltas/
icons_uri: https://quay.io/fedora/flatpak/app-icons/
{% endif %}
clean_files_after: 1d
daemon:
update_interval: 30m
registries:
fedora:
{% if env == 'staging' %}
public_url: https://quay.io/fedora-testing/flatpak/
{% else %}
public_url: https://quay.io/fedora/flatpak/
{% endif %}
datasource: fedora
force_flatpak_token: true
indexes:
latest:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-latest.json
registry: fedora
tag: latest
bodhi_status: stable
extract_icons: True
delta_keep: 30d
latest-annotations:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-latest-annotations.json
registry: fedora
tag: latest
bodhi_status: stable
extract_icons: True
delta_keep: 30d
flatpak_annotations: True
{% for architecture in [ 'amd64', 'arm64', 'ppc64le' ] %}
latest-{{ architecture }}:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-latest-{{ architecture }}.json
registry: fedora
architecture: {{ architecture }}
tag: latest
bodhi_status: stable
extract_icons: True
delta_keep: 30d
latest-{{ architecture }}-annotations:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-latest-{{ architecture }}-annotations.json
registry: fedora
architecture: {{ architecture }}
tag: latest
bodhi_status: stable
extract_icons: True
delta_keep: 30d
flatpak_annotations: True
{% endfor %}
testing:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-testing.json
registry: fedora
tag: testing
bodhi_status: testing
extract_icons: True
testing-annotations:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-testing-annotations.json
registry: fedora
tag: testing
bodhi_status: testing
extract_icons: True
flatpak_annotations: True
{% for architecture in [ 'amd64', 'arm64', 'ppc64le' ] %}
testing-{{ architecture }}:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-testing-{{ architecture }}.json
registry: fedora
architecture: {{ architecture }}
tag: testing
bodhi_status: testing
extract_icons: True
testing-{{ architecture }}-annotations:
output: ${OUTPUT_DIR}/fedora/quay.io/flatpak-testing-{{ architecture }}-annotations.json
registry: fedora
architecture: {{ architecture }}
tag: testing
bodhi_status: testing
extract_icons: True
flatpak_annotations: True
{% endfor %}

View file

@ -4,15 +4,11 @@ koji_config: fedora
deltas_dir: ${OUTPUT_DIR}/deltas/
icons_dir: ${OUTPUT_DIR}/icons/
{% if env == 'staging' %}
deltas_uri: https://quay.io/fedora-testing/flatpak/deltas/
icons_uri: https://quay.io/fedora-testing/flatpak/app-icons/
#deltas_uri: https://registry{{ env_suffix }}.fedoraproject.org/deltas/
#icons_uri: https://registry{{ env_suffix }}.fedoraproject.org/app-icons/
deltas_uri: https://registry{{ env_suffix }}.fedoraproject.org/deltas/
icons_uri: https://registry{{ env_suffix }}.fedoraproject.org/app-icons/
{% else %}
deltas_uri: https://cdn.registry.fedoraproject.org/deltas/
icons_uri: https://cdn.registry.fedoraproject.org/app-icons/
#deltas_uri: https://quay.io/fedora/flatpak/deltas/
#icons_uri: https://quay.io/fedora/flatpak/app-icons/
{% endif %}
clean_files_after: 1d
daemon:
@ -20,11 +16,9 @@ daemon:
registries:
fedora:
{% if env == 'staging' %}
public_url: https://quay.io/fedora-testing/flatpak/
# public_url: https://registry{{ env_suffix }}.fedoraproject.org
public_url: https://registry{{ env_suffix }}.fedoraproject.org
{% else %}
public_url: https://registry.fedoraproject.org/
# public_url: https://quay.io/fedora/flatpak/
{% endif %}
datasource: fedora
force_flatpak_token: true

View file

@ -10,6 +10,14 @@ data:
---
kind: ConfigMap
apiVersion: v1
metadata:
name: indexer-quay-config
data:
config.yaml: |-
{{ load_file('config.quay.yaml') | indent(4) }}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: koji-conf
data:

View file

@ -60,6 +60,128 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: flatpak-quay-indexer
labels:
app: flatpak-quay-indexer
annotations:
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"flatpak-indexer:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"flatpak-quay-indexer\")].image"}]'
spec:
replicas: 1
selector:
matchLabels:
app: flatpak-quay-indexer
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
labels:
app: flatpak-quay-indexer
spec:
containers:
- name: flatpak-quay-indexer
image: image-registry.openshift-image-registry.svc:5000/flatpak-indexer/flatpak-indexer:latest
env:
- name: OUTPUT_DIR
value: /var/www/flatpaks
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-password
key: password
- name: REDIS_URL
value: redis://redis.flatpak-indexer.svc.cluster.local:6379
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- mountPath: /etc/flatpak-indexer
name: indexer-config-volume
readOnly: true
- mountPath: /etc/koji.conf
name: koji-conf-volume
readOnly: true
- mountPath: /var/www/flatpaks
name: index-output-volume
volumes:
- name: indexer-config-volume
configMap:
name: indexer-quay-config
- name: koji-conf-volume
configMap:
name: koji-conf
- name: index-output-volume
persistentVolumeClaim:
claimName: flatpak-indexer-storage{{ '-stg' if env == 'staging' else '' }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: flatpak-indexer-quay-differ
name: flatpak-indexer-quay-differ
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: flatpak-indexer-quay-differ
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
labels:
app: flatpak-indexer-quay-differ
annotations:
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"flatpak-indexer:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"flatpak-indexer-quay-differ\")].image"}]'
spec:
containers:
- name: flatpak-indexer-quay-differ
image: image-registry.openshift-image-registry.svc:5000/flatpak-indexer/flatpak-indexer:latest
env:
- name: OUTPUT_DIR
value: /var/www/flatpaks
- name: FLATPAK_INDEXER_COMMAND
value: differ
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-password
key: password
- name: REDIS_URL
value: redis://redis.flatpak-indexer.svc.cluster.local:6379
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 2
memory: 1Gi
limits:
cpu: 2
memory: 8Gi
volumeMounts:
- mountPath: /etc/flatpak-indexer
name: indexer-config-volume
readOnly: true
- mountPath: /var/www/flatpaks
name: index-output-volume
volumes:
- name: indexer-config-volume
configMap:
name: indexer-quay-config
- name: index-output-volume
persistentVolumeClaim:
claimName: flatpak-indexer-storage{{ '-stg' if env == 'staging' else '' }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: flatpak-indexer-differ