Skip to content

Commit

Permalink
Merge pull request 2i2c-org#148 from jnywong/rename-frx-challenges
Browse files Browse the repository at this point in the history
Rename frx challenges
  • Loading branch information
jnywong authored Oct 28, 2024
2 parents 14174c3 + ac1c391 commit 1b4cfb1
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
- "**"

jobs:
# Packages the Helm chart, and pushes it to 2i2c-org/unnamed-thingity-thing@gh-pages.
# Packages the Helm chart, and pushes it to 2i2c-org/frx-challenges@gh-pages.
#
publish:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
ref = "${{ github.event.ref }}"
publishing = ""
if (
repo == "2i2c-org/unnamed-thingity-thing"
repo == "2i2c-org/frx-challenges"
and event == "push"
and (
ref.startswith("refs/tags/")
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ python3 manage.py runserver

In order to access the admin interface at `/admin`, your user needs to be a Django superuser.

Because we use GitHub external login we cannot use the existing `manage.py createsuperuser` command, so a separate [promote command](https://github.com/2i2c-org/unnamed-thingity-thing/blob/main/comptest/web/management/commands/promote.py) was created to promote an existing user (created via GiHub login) into a superuser.
Because we use GitHub external login we cannot use the existing `manage.py createsuperuser` command, so a separate [promote command](https://github.com/2i2c-org/frx-challenges/blob/main/comptest/web/management/commands/promote.py) was created to promote an existing user (created via GiHub login) into a superuser.

Steps to access the admin interface:

Expand Down Expand Up @@ -81,6 +81,6 @@ do a submission:

## Code of Conduct

Please note that this project has a [Code of Conduct](https://github.com/2i2c-org/unnamed-thingity-thing?tab=coc-ov-file). By participating in this project you agree to follow it.
Please note that this project has a [Code of Conduct](https://github.com/2i2c-org/frx-challenges?tab=coc-ov-file). By participating in this project you agree to follow it.

Thank you for your contributions!
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM python:3.12.5-slim-bullseye

RUN pip3 install gunicorn

RUN mkdir /opt/unnamed-thingity-thing
RUN mkdir /opt/frx-challenges

COPY . /opt/unnamed-thingity-thing
COPY . /opt/frx-challenges

WORKDIR /opt/unnamed-thingity-thing
WORKDIR /opt/frx-challenges

RUN pip3 install -r requirements.txt
4 changes: 2 additions & 2 deletions chartpress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# https://github.com/jupyterhub/chartpress
#
charts:
- name: unnamed
- name: frx-challenges
chartPath: helm-chart
imagePrefix: quay.io/2i2c/
# Set dev version by taking latest tag and incrementing patch
Expand All @@ -31,7 +31,7 @@ charts:
published: https://2i2c.org/frx-challenges-helm-chart/

images:
unnamed:
frx-challenges:
dockerfilePath: Dockerfile
contextPath: .
valuesPath: image
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: unnamed
name: frx-challenges
description: A Helm chart for Kubernetes
version: 0.1.0
appVersion: "1.16.0"
20 changes: 10 additions & 10 deletions helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "unnamed.name" -}}
{{- define "frx-challenges.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "unnamed.fullname" -}}
{{- define "frx-challenges.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "unnamed.chart" -}}
{{- define "frx-challenges.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "unnamed.labels" -}}
helm.sh/chart: {{ include "unnamed.chart" . }}
{{ include "unnamed.selectorLabels" . }}
{{- define "frx-challenges.labels" -}}
helm.sh/chart: {{ include "frx-challenges.chart" . }}
{{ include "frx-challenges.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,16 +45,16 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "unnamed.selectorLabels" -}}
app.kubernetes.io/name: {{ include "unnamed.name" . }}
{{- define "frx-challenges.selectorLabels" -}}
app.kubernetes.io/name: {{ include "frx-challenges.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "unnamed.toYamlRecursive" -}}
{{- define "frx-challenges.toYamlRecursive" -}}
{{- range $key, $value := . }}
{{- if kindIs "map" $value }}
{{ $key }}:
{{- include "unnamed.toYamlRecursive" $value | indent 2 }}
{{- include "frx-challenges.toYamlRecursive" $value | indent 2 }}
{{- else if or (kindIs "array" $value) (kindIs "slice" $value) }}
{{ $key }}:
{{- range $item := $value }}
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "unnamed.fullname" . }}-nginx
name: {{ include "frx-challenges.fullname" . }}-nginx
data:
default.conf: |
server {
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/configmap-yamlconf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "unnamed.fullname" . }}-django-yamlconf
name: {{ include "frx-challenges.fullname" . }}-django-yamlconf
data:
comptest.yaml: |
{{ mustToJson .Values.yamlSettings.overrides }}
34 changes: 17 additions & 17 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "unnamed.fullname" . }}
name: {{ include "frx-challenges.fullname" . }}
labels:
{{- include "unnamed.labels" . | nindent 4 }}
{{- include "frx-challenges.labels" . | nindent 4 }}
spec:
strategy:
# We have a PVC that can be only bound to one place, so needs to Recreate
type: Recreate
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "unnamed.selectorLabels" . | nindent 6 }}
{{- include "frx-challenges.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
Expand All @@ -22,13 +22,13 @@ spec:
{{- . | nindent 8 | toYaml }}
{{- end }}
labels:
{{- include "unnamed.selectorLabels" . | nindent 8 }}
{{- include "frx-challenges.selectorLabels" . | nindent 8 }}
spec:
initContainers:
- name: db-migrate
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/unnamed-thingity-thing/comptest
workingDir: /opt/frx-challenges/comptest
command:
- python
- manage.py
Expand All @@ -39,12 +39,12 @@ spec:
- name: storage
mountPath: /opt/state
- name: django-yamlconf
mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml
mountPath: /opt/frx-challenges/comptest/comptest.yaml
subPath: comptest.yaml
- name: collect-static
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/unnamed-thingity-thing/comptest
workingDir: /opt/frx-challenges/comptest
command:
- python
- manage.py
Expand All @@ -54,14 +54,14 @@ spec:
runAsUser: 0
volumeMounts:
- name: django-yamlconf
mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml
mountPath: /opt/frx-challenges/comptest/comptest.yaml
subPath: comptest.yaml
- name: staticfiles
mountPath: /opt/staticfiles
- name: admin-add
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/unnamed-thingity-thing/comptest
workingDir: /opt/frx-challenges/comptest
command:
{{- if .Values.adminUsers }}
- python
Expand All @@ -80,7 +80,7 @@ spec:
- name: storage
mountPath: /opt/state
- name: django-yamlconf
mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml
mountPath: /opt/frx-challenges/comptest/comptest.yaml
subPath: comptest.yaml
{{ with .Values.extraInitContainers }}
{{ $extraInitContainers := . }}
Expand All @@ -93,7 +93,7 @@ spec:
- name: django
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/unnamed-thingity-thing/comptest
workingDir: /opt/frx-challenges/comptest
command:
- gunicorn
- --bind
Expand All @@ -106,7 +106,7 @@ spec:
- name: storage
mountPath: /opt/state
- name: django-yamlconf
mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml
mountPath: /opt/frx-challenges/comptest/comptest.yaml
subPath: comptest.yaml
- name: dind
image: {{ .Values.dind.image.repository }}:{{ .Values.dind.image.tag }}
Expand All @@ -128,7 +128,7 @@ spec:
- name: evaluator
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/unnamed-thingity-thing/comptest
workingDir: /opt/frx-challenges/comptest
command:
- python
- manage.py
Expand All @@ -139,7 +139,7 @@ spec:
- name: storage
mountPath: /opt/state
- name: django-yamlconf
mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml
mountPath: /opt/frx-challenges/comptest/comptest.yaml
subPath: comptest.yaml
env:
- name: DOCKER_HOST
Expand All @@ -165,12 +165,12 @@ spec:
volumes:
- name: storage
persistentVolumeClaim:
claimName: {{ include "unnamed.fullname" . }}
claimName: {{ include "frx-challenges.fullname" . }}
- name: staticfiles
emptyDir: {}
- name: django-yamlconf
configMap:
name: {{ include "unnamed.fullname" . }}-django-yamlconf
name: {{ include "frx-challenges.fullname" . }}-django-yamlconf
- name: nginx-config
configMap:
name: {{ include "unnamed.fullname" . }}-nginx
name: {{ include "frx-challenges.fullname" . }}-nginx
6 changes: 3 additions & 3 deletions helm-chart/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "unnamed.fullname" . }}
name: {{ include "frx-challenges.fullname" . }}
labels:
{{- include "unnamed.labels" . | nindent 4 }}
{{- include "frx-challenges.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- . | toYaml | nindent 4 }}
Expand All @@ -21,7 +21,7 @@ spec:
pathType: {{ $.Values.ingress.pathType }}
backend:
service:
name: {{ include "unnamed.fullname" $ }}
name: {{ include "frx-challenges.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- if $host }}
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "unnamed.fullname" . }}
name: {{ include "frx-challenges.fullname" . }}
labels:
{{- include "unnamed.labels" . | nindent 4 }}
{{- include "frx-challenges.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
6 changes: 3 additions & 3 deletions helm-chart/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "unnamed.fullname" . }}
name: {{ include "frx-challenges.fullname" . }}
labels:
{{- include "unnamed.labels" . | nindent 4 }}
{{- include "frx-challenges.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
selector: {{ include "unnamed.selectorLabels" . | nindent 4 }}
selector: {{ include "frx-challenges.selectorLabels" . | nindent 4 }}
2 changes: 1 addition & 1 deletion helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: "unnamed"
repository: "frx-challenges"
tag: "1.0.1"
pullPolicy: IfNotPresent

Expand Down

0 comments on commit 1b4cfb1

Please sign in to comment.