Skip to main content

cdk8s-argocd-resources

Has the ability to synth ArgoCD Application, and AppProject manifests. See example.

Overview

example

# Example automatically generated from non-compiling source. May contain errors.
import { Construct } from 'constructs';
import { App, Chart, ChartProps } from 'cdk8s';
import * as argo from '@opencdk8s/cdk8s-argocd-resources';

export class MyChart extends Chart {
  constructor(scope: Construct, id: string, props: ChartProps = { }) {
    super(scope, id, props);

    new argo.ArgoCdApplication(this, 'DemoApp', {
      metadata: {
        name: 'demo',
        namespace: 'argocd',
      },
      spec: {
        project: 'default',
        source: {
          repoURL: 'example-git-repo',
          path: 'examplepath',
          targetRevision: 'HEAD',
        },
        destination: {
          server: 'https://kubernetes.default.svc'
        },
        syncPolicy: {
          syncOptions: [
            'ApplyOutOfSyncOnly=true'
          ]
        }
      },
    });

    new argo.ArgoCdProject(this, 'DemoProject', {
      metadata: {
        name: 'demo',
        namespace: 'argocd',
      },
      spec: {
        description: 'demo project',
        sourceRepos: [
          '*'
        ],
        destination: [{
          namespace: 'default',
          server: 'https://kubernetes.default.svc'
        }]
      }

    });

    // define resources here

  }
}

const app = new App();
new 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

  1. Fork (link)

  2. Bootstrap the repo:

    npx projen   # generates package.json
    yarn install # installs dependencies
    
  3. 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
  4. Create a feature branch

  5. Commit your changes

  6. Rebase your local changes against the master branch

  7. Create a new Pull Request (use conventional commits for the title please)

Licence

Apache License, Version 2.0

Author

Hunter-Thompson

Metadata

Release files for cdk8s-argocd-resources 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk8s-argocd-resources 0.0.5
File Size Uploaded Provenance Actions
cdk8s-argocd-resources-0.0.5.tar.gz 590.5 kB Without provenance Details for cdk8s-argocd-resources-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdk8s-argocd-resources 0.0.5
File Interpreter ABI Platform Actions
cdk8s_argocd_resources-0.0.5-py3-none-any.whl Python 3 none any Details for cdk8s_argocd_resources-0.0.5-py3-none-any.whl

Total release size: 1.2 MB

Release files / cdk8s-argocd-resources-0.0.5.tar.gz

Download URL cdk8s-argocd-resources-0.0.5.tar.gz
Size 590.5 kB
Tags Source
SHA-256 checksum
How to use checksums
25faec3a98baa36192f148dbfd1bb5e5e0d69bc135d2ca980a0b42f358530817
BLAKE2b-256 checksum
How to use checksums
586912c3c2fd4f33766f849f6bffa394a1abd53d749a75ff832c3dfb78b1cddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / cdk8s_argocd_resources-0.0.5-py3-none-any.whl

Download URL cdk8s_argocd_resources-0.0.5-py3-none-any.whl
Size 590.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb356e9a5eda39d8fe3c71a79b74ac4d62aa790a31930f5c90d76e434193b2c6
BLAKE2b-256 checksum
How to use checksums
8ef6509d09eabeec6b9d99b5a7670e92a782e20f34d646718eed48015da9ba2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for cdk8s-argocd-resources 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page