Skip to content

Commit

Permalink
CR-23223 rename and graduate argo-cd-sync step from incubating (#692)
Browse files Browse the repository at this point in the history
* CR-23223 rename and graduate argo-cd-sync step from incubating

* CR-23223 rename and graduate argo-cd-sync step from incubating

* CR-23223 rename and graduate argo-cd-sync step from incubating

* CR-23223 rename and graduate argo-cd-sync step from incubating

* merge last argo-cd-sync step to gitops-argocd-sync
  • Loading branch information
vadim-kharin-codefresh authored Apr 17, 2024
1 parent 45975a2 commit 1b98a3a
Show file tree
Hide file tree
Showing 17 changed files with 773 additions and 1 deletion.
2 changes: 2 additions & 0 deletions graduated/gitops-argocd-sync/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
env_vars_to_export
vars.sh
42 changes: 42 additions & 0 deletions graduated/gitops-argocd-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Changelog

## [1.4.5] - 2024-04-04
### Fixed
- fixing CVEs
- upgrade requirements.txt
- install Python modules locally

## [1.4.4] - 2024-03-07
### Fixed
- Do not sync an application in auto-sync mode
- Check for application existence before anything is done

## [1.4.3] - 2024-02-22
### Fixed
- Intercepting application not found for better error message

### Changed
- Move the creation of the link to the application earlier
- Exit with error when app is in OUT_OF_SYNC state

## [1.4.2] - 2024-01-17
### Changed
- New graphql call to speed up query

## [1.4.1] - 2023-10-31
### Changed
- Add CA_BUNDLE option

## [1.4.0] - 2023-10-30
### Changed
- Add INSECURE option

## [1.3.1] - 2023-09-18
### Fixed
- CVE-2023-37920 - upgrade Python module certifi to 2023.7.22
- CVE-2019-8457 - upgrade base image to python:3.11.5-slim-bookworm

## [1.3.0] - 2023-05-19
### Changed
- Adding IMAGE_NAME parameter
- Adding example
16 changes: 16 additions & 0 deletions graduated/gitops-argocd-sync/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.13.0a5-bookworm


# USER codefresh
RUN useradd -d /home/codefresh -m -s /usr/bin/bash codefresh
USER codefresh
WORKDIR /home/codefresh

ENV PYTHONPATH /home/codefresh/.local/lib/python3.13/site-packages/

COPY --chown=codefresh requirements.txt requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install --user -r requirements.txt
COPY queries queries/
COPY argocd_sync.py run.py
CMD [ "python3", "run.py"]
30 changes: 30 additions & 0 deletions graduated/gitops-argocd-sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# gitops-argocd-sync

Syncs Argo CD apps managed by our GitOps Runtimes using Codefresh API

## Installation

* `pip3 install -r requirements.txt`

## Run

* `python3 argocd_sync.py`

## Supported parameters
| Name | Description | Optional | Default value |
|:---------------|:------------------------------------------------------------------------------------------|:---------|:--------------------------------------------|
| RUNTIME | The name of the GitOps Runtime managing the Argo CD Application | false | |
| APPLICATION | The name of the Argo CD Application to be synced | false | |
| ROLLBACK | Initiate a rollback to the previous revision if the Sync and Wait does not become healthy | true | |
| WAIT_ROLLBACK | Wait for the app to be healthy after a rollback. Forces ROLLBACK to true | true | |
| CA_BUNDLE | A base64 encoded string that contain the complete CA Certificate Bundle | true | |
| INSECURE | Allows the usage of a self-signed certificate in the chain to reach the API endpoint | true | |
| WAIT_HEALTHY | Wait for the app to be healthy | true | false |
| INTERVAL | Interval in seconds to wait between checks | true | 10 |
| MAX_CHECKS | Maximum numbers of checks to do (to avoid forever wait) | true | 10 |
| LOG_LEVEL | Set the log level, e.g. 'debug', 'info', 'warn', 'error', 'critical' (default 'error') | true | error |
| CF_URL | Codefresh API URL | true | https://g.codefresh.io |
| CF_API_KEY | Codefresh API token | true | |
| CF_STEP_NAME | Used in generating a link to the Apps Dashboard | true | STEP_NAME |
| IMAGE_NAME | Overwrites the image name | true | quay.io/codefreshplugins/gitops-argocd-sync |
| IMAGE_TAG | Overwrites the tag | true | 1.4.4 |
Loading

0 comments on commit 1b98a3a

Please sign in to comment.