Skip to content

Commit

Permalink
use enna-systems github, renaming docker registry folder
Browse files Browse the repository at this point in the history
  • Loading branch information
timok06 committed Apr 30, 2024
1 parent d916c94 commit 2f6b9f0
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
pull_request:
branches: [master]
env:
REGISTRY: rg.fr-par.scw.cloud/prod-enna-nsp
BASE_REPO: rg.fr-par.scw.cloud/prod-enna-nsp/${{ github.repository }}
REGISTRY: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems
BASE_REPO: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/${{ github.repository }}
jobs:
build-operator:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY controllers/ controllers/

# Build
ARG VERSION
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X 'github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1.Version=${VERSION}'" -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X 'github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1.Version=${VERSION}'" -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION ?= latest
# Image URL to use all building/pushing image targets
IMG ?= rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator:${VERSION}
IMG ?= rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator:${VERSION}
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.2

Expand Down Expand Up @@ -70,7 +70,7 @@ run: manifests generate fmt vet ## Run a controller from your host.

.PHONY: docker-login
docker-login: ## Push docker image with the manager.
docker login rg.fr-par.scw.cloud/prod-enna-nsp -u nologin -p ${SCW_TOKEN}
docker login rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems -u nologin -p ${SCW_TOKEN}

.PHONY: docker-build
docker-build: test ## Build docker image with the manager.
Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ domain: jit.si
layout:
- go.kubebuilder.io/v3
projectName: jitsi-kubernetes-operator
repo: github.com/jitsi-contrib/jitsi-kubernetes-operator
repo: github.com/enna-systems/jitsi-kubernetes-operator
resources:
- api:
crdVersion: v1
Expand All @@ -11,6 +11,6 @@ resources:
domain: jit.si
group: apps
kind: Jitsi
path: github.com/jitsi-contrib/jitsi-kubernetes-operator/jitsi-kubernetes-operator/api/v1alpha1
path: github.com/enna-systems/jitsi-kubernetes-operator/jitsi-kubernetes-operator/api/v1alpha1
version: v1alpha1
version: "3"
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Autoscaling Kubernetes Operator

A [https://k8s.libre.sh](https://k8s.libre.sh/) project
Expand All @@ -7,7 +6,7 @@ A [https://k8s.libre.sh](https://k8s.libre.sh/) project

## The issue

With covid universities and schools have to provide large scale infrastructure for visionconferences.
With covid universities and schools have to provide large scale infrastructure for visionconferences.
From an environmental standpoint, as much as technical and fincancial, running jitsi at scale can be challenging!

## Our magic solution
Expand All @@ -28,9 +27,11 @@ Depending on your region of the world, or your taste.
For the hackathon, we decided to use scaleway, as they provide autoscaling kubernetes cluster as a service

### Install our jitsi kubernetes operator
kubectl apply -f https://raw.githubusercontent.com/jitsi-contrib/jitsi-kubernetes-operator/master/deploy/jitsi-operator.yaml

kubectl apply -f https://raw.githubusercontent.com/enna-systems/jitsi-kubernetes-operator/master/deploy/jitsi-operator.yaml

### custom jitsi web interface

cf [Custom jitsi Web interface](interfaceJitsi.md)

### Profit
Expand All @@ -43,7 +44,7 @@ One JVB is deployed per node for network facilities, we need to know the JVB por
Firewall needs to allow JVB ports
A new replica of a JVB instance is a equivalent to new node in the kubernetes cluster

Single shard deployments. Multishard can be implemented later.
Single shard deployments. Multishard can be implemented later.
1 shard = 1 signaling server - prosody and jicofo instance - and multiple JVBs and Web instances
3 Topologies:

Expand All @@ -53,12 +54,12 @@ If you wan to determistacaly define your deployements and replicas.

### Daemonset:

If all your cluster nodes are dedicated to your jitsi cluster, you can use this strategy.
JVB processes will be deployed on each nodes.
If all your cluster nodes are dedicated to your jitsi cluster, you can use this strategy.
JVB processes will be deployed on each nodes.

### Autoscalable:

JVB will be autoscaled according to stress level.
JVB will be autoscaled according to stress level.

We had to tune how to read metrics for the jvb using:

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/jitsi_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (jitsi *Jitsi) EnvVars(names []string) []corev1.EnvVar {

func (jitsi *Jitsi) SetDefaults() {
if len(jitsi.Spec.Image.Registry) == 0 {
jitsi.Spec.Image.Registry = "rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator"
jitsi.Spec.Image.Registry = "rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator"
}

if len(jitsi.Spec.Image.Tag) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator
newName: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator
newTag: latest
2 changes: 1 addition & 1 deletion controllers/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"fmt"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
networkingv1 "k8s.io/api/networking/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/jibri.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controllers

import (
"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
appsv1 "k8s.io/api/apps/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/jicofo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"net/http"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
"github.com/tidwall/gjson"
Expand Down
2 changes: 1 addition & 1 deletion controllers/jitsi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

appsv1alpha1 "github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
appsv1alpha1 "github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

apierrs "k8s.io/apimachinery/pkg/api/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/jvb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"fmt"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/rand"
"github.com/presslabs/controller-util/pkg/syncer"
Expand Down
2 changes: 1 addition & 1 deletion controllers/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"fmt"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/prosody.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"fmt"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
appsv1 "k8s.io/api/apps/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

appsv1alpha1 "github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
appsv1alpha1 "github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"fmt"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
"github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"

"github.com/presslabs/controller-util/pkg/syncer"
appsv1 "k8s.io/api/apps/v1"
Expand Down
2 changes: 1 addition & 1 deletion deploy/jitsi-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2949,7 +2949,7 @@ spec:
- --leader-elect
command:
- /manager
image: rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator:latest
image: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator:latest
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/jitsi-contrib/jitsi-kubernetes-operator
module github.com/enna-systems/jitsi-kubernetes-operator

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions hack/publish-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches: [master]

env:
REGISTRY: rg.fr-par.scw.cloud/prod-enna-nsp
BASE_REPO: rg.fr-par.scw.cloud/prod-enna-nsp/${{ github.repository }}
REGISTRY: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems
BASE_REPO: rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/${{ github.repository }}

jobs:
build-operator:
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (

monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"

"github.com/jitsi-contrib/jitsi-kubernetes-operator/controllers"
"github.com/enna-systems/jitsi-kubernetes-operator/controllers"

appsv1alpha1 "github.com/jitsi-contrib/jitsi-kubernetes-operator/api/v1alpha1"
appsv1alpha1 "github.com/enna-systems/jitsi-kubernetes-operator/api/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
4 changes: 2 additions & 2 deletions scripts/build-containters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JITSI_VERSION=$(cat JITSI_VERSION)

for context in images/*; do
name=$(basename $context)
docker buildx build --build-arg "JITSI_VERSION=$JITSI_VERSION" --file images/$name/Containerfile -t rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator/$name:$VERSION -o type=docker,dest=build/$name.tar $context
docker buildx build --build-arg "JITSI_VERSION=$JITSI_VERSION" --file images/$name/Containerfile -t rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator/$name:$VERSION -o type=docker,dest=build/$name.tar $context
done

docker buildx build --build-arg "VERSION=$VERSION" -t rg.fr-par.scw.cloud/prod-enna-nsp/jitsi-kubernetes-operator:$VERSION -o type=docker,dest=build/jitsi-kubernetes-operator.tar .
docker buildx build --build-arg "VERSION=$VERSION" -t rg.fr-par.scw.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator:$VERSION -o type=docker,dest=build/jitsi-kubernetes-operator.tar .
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kind load image-archive --name jitsi-test build/web.tar

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml

cat deploy/jitsi-operator.yaml | sed "s#rg\.fr-par\.scw\.cloud/prod-enna-nsp/jitsi-kubernetes-operator:latest#$BASE_REPO:$VERSION#" | kubectl apply -f -
cat deploy/jitsi-operator.yaml | sed "s#rg\.fr-par\.scw\.cloud/prod-enna-nsp/enna-systems/jitsi-kubernetes-operator:latest#$BASE_REPO:$VERSION#" | kubectl apply -f -

LOCAL_IP=$(ip route get 1 | awk '{print $7}')
echo "Local IP is $LOCAL_IP"
Expand Down

0 comments on commit 2f6b9f0

Please sign in to comment.