[flatpak-indexer] Enable quay.io support
This is the first experiment to make flatpak-indexer working with quay.io. Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
cdb7471dfe
commit
d2588c8049
4 changed files with 342 additions and 90 deletions
|
@ -0,0 +1,85 @@
|
|||
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:
|
||||
public_url: https://quay.io/fedora-testing/flatpak/
|
||||
datasource: fedora
|
||||
force_flatpak_token: true
|
||||
indexes:
|
||||
latest:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-latest.json
|
||||
registry: fedora
|
||||
tag: latest
|
||||
bodhi_status: stable
|
||||
extract_icons: True
|
||||
delta_keep: 30d
|
||||
latest-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/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/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/flatpak-testing.json
|
||||
registry: fedora
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/flatpak-testing-{{ architecture }}.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-{{ architecture }}-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-testing-{{ architecture }}-annotations.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
flatpak_annotations: True
|
||||
{% endfor %}
|
|
@ -0,0 +1,85 @@
|
|||
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://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/
|
||||
{% endif %}
|
||||
clean_files_after: 1d
|
||||
daemon:
|
||||
update_interval: 30m
|
||||
registries:
|
||||
fedora:
|
||||
public_url: https://registry.fedoraproject.org/
|
||||
datasource: fedora
|
||||
force_flatpak_token: true
|
||||
indexes:
|
||||
latest:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-latest.json
|
||||
registry: fedora
|
||||
tag: latest
|
||||
bodhi_status: stable
|
||||
extract_icons: True
|
||||
delta_keep: 30d
|
||||
latest-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/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/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/flatpak-testing.json
|
||||
registry: fedora
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/flatpak-testing-{{ architecture }}.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-{{ architecture }}-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-testing-{{ architecture }}-annotations.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
flatpak_annotations: True
|
||||
{% endfor %}
|
|
@ -2,94 +2,18 @@
|
|||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: indexer-config
|
||||
name: indexer-registry-fedora-config
|
||||
data:
|
||||
config.yaml: |-
|
||||
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://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/
|
||||
{% endif %}
|
||||
clean_files_after: 1d
|
||||
daemon:
|
||||
update_interval: 30m
|
||||
registries:
|
||||
fedora:
|
||||
public_url: https://registry.fedoraproject.org/
|
||||
datasource: fedora
|
||||
force_flatpak_token: true
|
||||
indexes:
|
||||
latest:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-latest.json
|
||||
registry: fedora
|
||||
tag: latest
|
||||
bodhi_status: stable
|
||||
extract_icons: True
|
||||
delta_keep: 30d
|
||||
latest-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/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/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/flatpak-testing.json
|
||||
registry: fedora
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/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/flatpak-testing-{{ architecture }}.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
testing-{{ architecture }}-annotations:
|
||||
output: ${OUTPUT_DIR}/fedora/flatpak-testing-{{ architecture }}-annotations.json
|
||||
registry: fedora
|
||||
architecture: {{ architecture }}
|
||||
tag: testing
|
||||
bodhi_status: testing
|
||||
extract_icons: True
|
||||
flatpak_annotations: True
|
||||
{% endfor %}
|
||||
{{ load_file('config-registry_fedora.yaml') | indent(4) }}
|
||||
---
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: indexer-quay-io-config
|
||||
data:
|
||||
config.yaml: |-
|
||||
{{ load_file('config-quay_io.yaml') | indent(4) }}
|
||||
---
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
|
|
|
@ -4,7 +4,7 @@ apiVersion: apps.openshift.io/v1
|
|||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer
|
||||
name: flatpak-indexer
|
||||
name: flatpak-indexer-registry-fedora
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
@ -55,7 +55,7 @@ spec:
|
|||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: indexer-config
|
||||
name: indexer-registry-fedora-config
|
||||
name: indexer-config-volume
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
|
@ -81,7 +81,7 @@ apiVersion: apps.openshift.io/v1
|
|||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer-differ
|
||||
name: flatpak-indexer-differ
|
||||
name: flatpak-indexer-differ-registry-fedora
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
|
@ -138,7 +138,7 @@ spec:
|
|||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: indexer-config
|
||||
name: indexer-registry-fedora-config
|
||||
name: indexer-config-volume
|
||||
- name: index-output-volume
|
||||
persistentVolumeClaim:
|
||||
|
@ -226,3 +226,161 @@ spec:
|
|||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
{{% if env == 'staging'%}}
|
||||
---
|
||||
kind: DeploymentConfig
|
||||
apiVersion: apps.openshift.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer
|
||||
name: flatpak-indexer-quay-io
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
app: flatpak-indexer
|
||||
deploymentconfig: flatpak-indexer
|
||||
strategy:
|
||||
activeDeadlineSeconds: 21600
|
||||
resources: {}
|
||||
rollingParams:
|
||||
intervalSeconds: 1
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
timeoutSeconds: 600
|
||||
updatePeriodSeconds: 1
|
||||
type: Rolling
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer
|
||||
deploymentconfig: flatpak-indexer
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-password
|
||||
key: password
|
||||
- name: REDIS_URL
|
||||
value: redis://redis.flatpak-indexer.svc.cluster.local:6379
|
||||
image: flatpak-indexer:latest
|
||||
name: flatpak-indexer
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
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
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: indexer-quay-io-config
|
||||
name: indexer-config-volume
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: koji-conf
|
||||
name: koji-conf-volume
|
||||
- name: index-output-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: flatpak-indexer-storage{{ '-stg' if env == 'staging' else '' }}
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- flatpak-indexer
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: flatpak-indexer:latest
|
||||
---
|
||||
kind: DeploymentConfig
|
||||
apiVersion: apps.openshift.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer-differ
|
||||
name: flatpak-indexer-differ-quay-io
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
app: flatpak-indexer-differ
|
||||
deploymentconfig: flatpak-indexer-differ
|
||||
strategy:
|
||||
activeDeadlineSeconds: 21600
|
||||
resources: {}
|
||||
rollingParams:
|
||||
intervalSeconds: 1
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
timeoutSeconds: 600
|
||||
updatePeriodSeconds: 1
|
||||
type: Rolling
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flatpak-indexer-differ
|
||||
deploymentconfig: flatpak-indexer-differ
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- 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
|
||||
image: flatpak-indexer:latest
|
||||
name: flatpak-indexer-differ
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 2
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 3Gi
|
||||
volumeMounts:
|
||||
- mountPath: /etc/flatpak-indexer
|
||||
name: indexer-config-volume
|
||||
readOnly: true
|
||||
- mountPath: /var/www/flatpaks
|
||||
name: index-output-volume
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: indexer-quay-io-config
|
||||
name: indexer-config-volume
|
||||
- name: index-output-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: flatpak-indexer-storage{{ '-stg' if env == 'staging' else '' }}
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- flatpak-indexer-differ
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: flatpak-indexer:latest
|
||||
{{%endif%}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue