Skip to content

Commit

Permalink
Merge branch 'main' into APL-171
Browse files Browse the repository at this point in the history
  • Loading branch information
j-zimnowoda authored Aug 28, 2024
2 parents e7716c0 + 816c9f1 commit d54a377
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/k8s_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Get familiar with the `schemas/Readme.md` file

- [ ] Kubectl [version skew](https://kubernetes.io/releases/version-skew-policy/#kubectl) from is compatible with all three supported k8s versions
- [ ] Helm [version skew](https://helm.sh/docs/topics/version_skew/#supported-version-skew) from is compatible with all three supported k8s versions
- [ ] A new otomi/tools version is published
- [ ] The otomi/tools version is used by the otomi/core image
- [ ] A new linode/apl-tools version is published
- [ ] The linode/apl-tools version is used by the linode/apl-core image

**.github/workflows**

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ on:
env:
CACHE_REGISTRY: ghcr.io
CACHE_REPO: linode/apl-core
REPO: otomi/core
REPO: linode/apl-core
GIT_USER: svcAPLBot
SCALEWAY_NODE_TYPE: PRO2-M
SCALEWAY_NODE_POOL_MIN_SIZE: 3
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
env:
CACHE_REGISTRY: ghcr.io
CACHE_REPO: linode/apl-core
REPO: otomi/core
REPO: linode/apl-core
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_LINODEBOT_TOKEN }}
DOCKER_USERNAME: ${{ vars.DOCKERHUB_LINODEBOT_USERNAME }}

jobs:
build-test-cache:
Expand Down Expand Up @@ -60,7 +62,7 @@ jobs:
image="$CACHE_REGISTRY/$CACHE_REPO:$TAG"
docker pull $image
docker tag $image $REPO:$TAG
docker login -u otomi -p ${{ secrets.DOCKERHUB_OTOMI_TOKEN }}
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push $REPO:$TAG
- name: Show me the logic
run: |
Expand All @@ -83,7 +85,7 @@ jobs:
id: git_tag
run: |
TAG=${GITHUB_REF##*/}
docker login -u otomi -p ${{ secrets.DOCKERHUB_OTOMI_TOKEN }}
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker pull $REPO:$TAG
docker tag $REPO:$TAG $REPO:latest
docker push $REPO:latest
Expand Down Expand Up @@ -113,7 +115,7 @@ jobs:
if: always() && contains(needs.release.result, 'success') && !github.event.act
runs-on: ubuntu-latest
container:
image: otomi/tools:v1.4.20
image: linode/apl-tools:v2.4.0
options: --user 0
steps:
- name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/otomi-tools-build-push.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Otomi Tools Build and Versioning
name: APL Tools Build and Versioning

on:
workflow_dispatch:
Expand All @@ -13,8 +13,8 @@ on:
- 'main'

env:
NAMESPACE: otomi
REPO: tools
NAMESPACE: linode
REPO: apl-tools

jobs:
build-and-version:
Expand Down Expand Up @@ -76,8 +76,8 @@ jobs:
if: ${{ env.NEW_VERSION != null }}
uses: docker/login-action@v3
with:
username: 'otomi'
password: '${{ secrets.DOCKERHUB_OTOMI_TOKEN }}'
username: ${{ vars.DOCKERHUB_LINODEBOT_USERNAME }}
password: ${{ secrets.DOCKERHUB_LINODEBOT_TOKEN }}
- name: image build and push tag for branch
if: ${{ env.NEW_VERSION != null }}
uses: docker/build-push-action@v5
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM otomi/tools:v2.3.0 as ci
FROM linode/apl-tools:v2.4.0 as ci

ENV APP_HOME=/home/app/stack

Expand Down Expand Up @@ -27,7 +27,7 @@ FROM ci as clean
RUN npm prune --production

#-----------------------------
FROM otomi/tools:v2.3.0 as prod
FROM linode/apl-tools:v2.4.0 as prod

ENV APP_HOME=/home/app/stack
ENV ENV_DIR=/home/app/stack/env
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</p>
<p align="center">
<a href="https://img.shields.io/badge/contributions-welcome-orange.svg"><img alt="Contributions" src="https://img.shields.io/badge/contributions-welcome-orange.svg" /></a>
<a href="http://otomi.io/"><img src="https://img.shields.io/website-up-down-green-red/http/shields.io.svg" alt="Website otomi.io"></a>
<a href="https://apl-docs.net/"><img src="https://img.shields.io/website-up-down-green-red/http/shields.io.svg" alt="Website apl-docs.net"></a>
<a href="https://join.slack.com/t/otomi/shared_invite/zt-1axa4vima-E~LHN36nbLR~ay5r5pGq9A"><img src="https://img.shields.io/badge/slack--channel-blue?logo=slack"></a>
</p>

Expand All @@ -35,7 +35,7 @@ To install APL, make sure to have a Kubernetes cluster running with at least:
> The transition from Otomi to APL is still in progress. Installing APL will use the latest Otomi release (v2.11.5).
> [!TIP]
> Install APL with DNS to unlock it's full potential. Check [here](https://otomi.io) for more info.
> Install APL with DNS to unlock it's full potential. Check [here](https://apl-docs.net) for more info.

Add the Helm repository:
Expand All @@ -53,7 +53,7 @@ helm install apl apl/otomi \
--set cluster.provider=$PROVIDER # use 'linode' for LKE or 'custom' for any other cloud/infrastructure
```

When the installer job is completed, follow the [activation steps](https://otomi.io/docs/get-started/activation).
When the installer job is completed, follow the [activation steps](https://apl-docs.net/docs/get-started/activation).

## Integrations

Expand Down Expand Up @@ -93,7 +93,7 @@ When the installer job is completed, follow the [activation steps](https://otomi

## Documentation

Check out [otomi.io](https://otomi.io) for more detailed documentation.
Check out [apl-docs.net](https://apl-docs.net) for more detailed documentation.

## License

Expand Down
2 changes: 1 addition & 1 deletion bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LOG_LEVEL='--log-level warn'

# Common vars
readonly otomi_settings="$ENV_DIR/env/settings.yaml"
readonly otomi_tools_image="otomi/core:latest"
readonly otomi_tools_image="linode/apl-core:latest"
[ $(uname -s) == 'Linux' ] && readonly LINUX_WORKAROUND='--user=root:root'

# Mutliple files vars
Expand Down
2 changes: 1 addition & 1 deletion binzx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```sh
# In the apl-core directory
export DOCKER_TAG=binzx
docker build --target prod -t otomi/core:binzx .
docker build --target prod -t linode/apl-core:binzx .
./binzx/otomi <commands here>
```

Expand Down
4 changes: 2 additions & 2 deletions binzx/otomi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## - do not depend on any external files.
## - do not use any non standard tooling.
## - only Docker is needed to run apl-core image
## If you need to use any extra binaries then most probably you want to add them to the otomi/tools image.
## If you need to use any extra binaries then most probably you want to add them to the linode/apl-tools image.
##
#####################################################################################
# shellcheck disable=SC2128
Expand Down Expand Up @@ -90,7 +90,7 @@ else
fi
otomi_branch_or_tag=${OTOMI_TAG:-$otomi_version}
otomi_version_used=${OTOMI_TAG:-$otomi_version}
readonly otomi_tools_image="otomi/core:${otomi_version_used}"
readonly otomi_tools_image="linode/apl-core:${otomi_version_used}"

script_full_path="$base_dir/${BASH_SOURCE[0]##*/}"
if [[ ${BASH_SOURCE[0]} == '/'* ]]; then
Expand Down
2 changes: 1 addition & 1 deletion chart/apl/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $kms := .Values.kms | default dict }}
{{- $imageName := .Values.imageName | default "otomi/core" }}
{{- $imageName := .Values.imageName | default "linode/apl-core" }}
{{- $version := .Values.otomi.version | default .Chart.AppVersion }}
apiVersion: batch/v1
kind: Job
Expand Down
2 changes: 1 addition & 1 deletion chart/apl/templates/post-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
type: RuntimeDefault
containers:
- name: destroy
image: otomi/core:{{ $version }}
image: linode/apl-core:{{ $version }}
imagePullPolicy: {{ ternary "IfNotPresent" "Always" (regexMatch "^v\\d" $version) }}
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion charts/otomi-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ core: {}
tools:
image:
registry: docker.io
repository: otomi/core
repository: linode/apl-core
tag: latest
pullPolicy: IfNotPresent

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
stepTemplate:
computeResources: {{- toYaml .Values.tektonTask.resources | nindent 6 }}
workingDir: $(workspaces.source.path)
image: otomi/core:{{ .Values.otomiVersion }}
image: linode/apl-core:{{ .Values.otomiVersion }}
steps:
- name: git-clone
computeResources: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
stepTemplate:
computeResources: {{- toYaml .Values.tektonTask.resources | nindent 6 }}
imagePullPolicy: Always
image: otomi/core:$(params["OTOMI_VERSION"])
image: linode/apl-core:$(params["OTOMI_VERSION"])
workingDir: /home/app/stack
{{- if hasKey $kms "sops" }}
envFrom:
Expand Down
2 changes: 1 addition & 1 deletion charts/otomi-pipelines/templates/tekton-otomi-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
stepTemplate:
computeResources: {{- toYaml .Values.tektonTask.resources | nindent 6 }}
imagePullPolicy: Always
image: otomi/core:$(params["OTOMI_VERSION"])
image: linode/apl-core:$(params["OTOMI_VERSION"])
workingDir: /home/app/stack
{{- if hasKey $kms "sops" }}
envFrom:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:

tools:
container_name: tools
image: otomi/core:${TOOLS_TAG:-latest}
image: linode/apl-core:${TOOLS_TAG:-latest}
user: ${USER_ID}:${GROUP_ID}
command: npm run compile && node --no-warnings ./dist/src/otomi.js -- server
depends_on:
Expand Down
12 changes: 6 additions & 6 deletions helmfile.d/snippets/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ environments:
quay.io/prometheus-operator/prometheus-operator,
quay.io/prometheus/prometheus,
quay.io/kiwigrid/k8s-sidecar,
docker.io/otomi/core,
docker.io/linode/apl-core,
docker.io/linode/apl-tasks,
docker.io/linode/apl-api,
docker.io/drone/drone-runner-kube,
Expand Down Expand Up @@ -163,7 +163,7 @@ environments:
condition: (
container.image.repository in (
docker.io/linode/apl-tasks,
ocker.io/otomi/core
docker.io/linode/apl-core
) or (k8s.ns.name = "drone-pipelines")
)
- macro: user_known_non_sudo_setuid_conditions
Expand Down Expand Up @@ -719,14 +719,14 @@ environments:
operator:
requests:
cpu: 100m
memory: 64Mi
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
cpu: "1"
memory: 1Gi
trivy:
requests:
cpu: 100m
memory: 64M
memory: 128M
limits:
cpu: 500m
memory: 512Mi
Expand Down
3 changes: 1 addition & 2 deletions helmfile.d/snippets/job.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
{{- $skipScript := . | get "skipScript" false }}
{{- $task := . | get "task" nil }}
{{- $type := . | get "type" "job" }}
{{- $repositoryPrefix := default "otomi/" (index . "repositoryPrefix" | default "") }}
image:
registry: docker.io
repository: {{ $repositoryPrefix }}{{ .item }}
repository: linode/apl-{{ .item }}
tag: {{ printf "%s%s" ($isSemver | ternary "v" "") $version }}
pullPolicy: {{ $isSemver | ternary "IfNotPresent" "Always" }}
{{ if $v._derived.untrustedCA }}
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export const bootstrap = async (
const { ENV_DIR } = env
const hasOtomi = await deps.pathExists(`${ENV_DIR}/bin/otomi`)

const otomiImage = `otomi/core:${tag}`
const otomiImage = `linode/apl-core:${tag}`
d.log(`Installing artifacts from ${otomiImage}`)
await deps.copyBasicFiles()
await deps.migrate()
Expand Down
8 changes: 4 additions & 4 deletions tools/Readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Building otomi/tools container image
# Building linode/apl-tools container image

```
docker build . -f Dockerfile -t otomi/tools:<TAG>
docker build . -f Dockerfile -t linode/apl-tools:<TAG>
```

# Building otomi/tools-db container image
# Building linode/apl-tools-db container image

```
docker build . -f Dockerfile-db -t otomi/tools-db:<TAG>
docker build . -f Dockerfile-db -t linode/apl-tools-db:<TAG>
```
2 changes: 1 addition & 1 deletion values/otomi-api/otomi-api.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resources:
memory: 256Mi
{{- end }}

{{- tpl (readFile "../../helmfile.d/snippets/job.gotmpl") (dict "repositoryPrefix" "linode/apl-" "item" "api" "v" $v "skipScript" true) }}
{{- tpl (readFile "../../helmfile.d/snippets/job.gotmpl") (dict "item" "api" "v" $v "skipScript" true) }}

secrets:
GIT_USER: otomi-admin
Expand Down
2 changes: 1 addition & 1 deletion values/otomi-console/otomi-console.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
memory: 128Mi
{{- end }}

{{- tpl (readFile "../../helmfile.d/snippets/job.gotmpl") (dict "repositoryPrefix" "linode/apl-" "item" "console" "v" $v "skipScript" true ) }}
{{- tpl (readFile "../../helmfile.d/snippets/job.gotmpl") (dict "item" "console" "v" $v "skipScript" true ) }}

env:
API_BASE_URL: /api
Expand Down
2 changes: 1 addition & 1 deletion versions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api: main
console: main
tasks: main
tools: 1.6.4
tools: 2.4.0

0 comments on commit d54a377

Please sign in to comment.