-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(v0.0.1): initial version (#1)
Should replicate secrets and configmaps using ns-object-mirror/to annotation. Should not replicate self-annotation to prevent infinite copy loop. Should not replicate if data has not changed. Should not replicate if annotations have not changed. Should replicate new annotations if updated. Should replicate new data if updated.
- Loading branch information
Showing
6 changed files
with
657 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: CI/CD Workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/kind-action@v1 | ||
with: | ||
cluster_name: kind | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10.14 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install pipenv | ||
pipenv install --dev | ||
- name: Run tests | ||
run: | | ||
pipenv run python test.py | ||
build_and_push: | ||
needs: test | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/${{ github.repository_owner }}/ns-object-mirror:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.10 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
# Install pipenv | ||
RUN pip install --upgrade pip && \ | ||
pip install pipenv | ||
|
||
# Copy Pipfile to the working directory | ||
COPY Pipfile /usr/src/app/ | ||
|
||
# Install any needed packages specified in Pipfile | ||
RUN pipenv install --deploy --ignore-pipfile | ||
|
||
# Copy the current directory contents into the container at /usr/src/app | ||
COPY . /usr/src/app | ||
|
||
# Run run.sh when the container launches | ||
CMD ["pipenv", "run", "python", "app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
kubernetes = "*" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.10" |
Oops, something went wrong.