@opencdk8s/cdk8s-argocd-resources
Project description
cdk8s-argocd-resources
Has the ability to synth ArgoCD Application, and AppProject manifests. See example.
Overview
example
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from constructs import Construct
from cdk8s import App, Chart, ChartProps
import opencdk8s.cdk8s_argocd_resources as argo
class MyChart(Chart):
def __init__(self, scope, id, *, namespace=None, labels=None):
super().__init__(scope, id, namespace=namespace, labels=labels)
argo.ArgoCdApplication(self, "DemoApp",
metadata={
"name": "demo",
"namespace": "argocd"
},
spec={
"project": "default",
"source": {
"repo_uRL": "example-git-repo",
"path": "examplepath",
"target_revision": "HEAD"
},
"destination": {
"server": "https://kubernetes.default.svc"
},
"sync_policy": {
"sync_options": ["ApplyOutOfSyncOnly=true"
]
}
}
)
argo.ArgoCdProject(self, "DemoProject",
metadata={
"name": "demo",
"namespace": "argocd"
},
spec={
"description": "demo project",
"source_repos": ["*"
],
"destination": [{
"namespace": "default",
"server": "https://kubernetes.default.svc"
}]
}
)
app = App()
MyChart(app, "asd")
app.synth()
demo.k8s.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: demo
namespace: argocd
spec:
destination:
server: https://kubernetes.default.svc
project: default
source:
path: examplepath
repoURL: example-git-repo
targetRevision: HEAD
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: demo
namespace: argocd
spec:
description: demo project
destination:
- namespace: default
server: https://kubernetes.default.svc
sourceRepos:
- "*"
Installation
TypeScript
Use yarn
or npm
to install.
$ npm install @opencdk8s/cdk8s-argocd-resources
$ yarn add @opencdk8s/cdk8s-argocd-resources
Python
$ pip install cdk8s-argocd-resources
Contribution
-
Fork (link)
-
Bootstrap the repo:
npx projen # generates package.json yarn install # installs dependencies
-
Development scripts:
Command Description yarn compile
Compiles typescript => javascript yarn watch
Watch & compile yarn test
Run unit test & linter through jest yarn test -u
Update jest snapshots yarn run package
Creates a dist
with packages for all languages.yarn build
Compile + test + package yarn bump
Bump version (with changelog) based on [conventional commits] yarn release
Bump + push to master
-
Create a feature branch
-
Commit your changes
-
Rebase your local changes against the master branch
-
Create a new Pull Request (use conventional commits for the title please)
Licence
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk8s-argocd-resources-0.0.1.tar.gz
(595.4 kB
view hashes)
Built Distribution
Close
Hashes for cdk8s-argocd-resources-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 373b5289702319fee206a9b82596ad032823f7b1c2234f060a21ea10c7ead358 |
|
MD5 | 8c3d3abe022c885ce832d0bf5a8bdba5 |
|
BLAKE2b-256 | 695fefcfd875cd6aa841353da2ac473e6276d7ad7169c4595ca506885e1bc8ce |
Close
Hashes for cdk8s_argocd_resources-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3a5370ccb3b29aca27ecff0a91aadb0ca85023a1a8002850b8d5846734f3ddf |
|
MD5 | ee331d100598b12295292a1f12138afb |
|
BLAKE2b-256 | ab978001d2255d6405d2ed68f28819d1a8bb9072605d809e0d48e682e1d03767 |