Skip to content

Commit

Permalink
add initial charm skeleton (#1)
Browse files Browse the repository at this point in the history
* add initial charm skeleton
  • Loading branch information
ca-scribner authored Jun 26, 2024
1 parent 03c5d19 commit 5e2fbdc
Show file tree
Hide file tree
Showing 22 changed files with 769 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: File a bug report
labels: ["Type: Bug", "Status: Triage"]
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this bug report! Before submitting your issue, please make
sure you are using the latest version of the charm. If not, please try upgrading to the latest edge release prior to
posting your report to make sure it's not already solved.
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: >
If applicable, add screenshots to
help explain the problem you are facing.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: To Reproduce
description: >
Please provide the output of `juju export-bundle` and step-by-step instructions for how to reproduce the behavior.
A deployment diagram could be handy too. See https://discourse.charmhub.io/t/9269 for examples.
placeholder: |
1. `juju deploy ...`
2. `juju relate ...`
3. `juju status --relations`
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: >
We need to know a bit more about the context in which you run the charm.
- Are you running Juju locally, on lxd, in multipass or on some other platform?
- What track and channel you deployed the charm from (ie. `latest/edge` or similar).
- Version of any applicable components, like the juju snap, the model controller, lxd, microk8s, and/or multipass.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: >
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Fetch the logs using `juju debug-log --replay` and `kubectl logs ...`. Additional details available in the juju docs
at https://juju.is/docs/olm/juju-logs
render: shell
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Enhancement Proposal
description: File an enhancement proposal
labels: ["Type: Enhancement", "Status: Triage"]
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this enhancement proposal! Before submitting your issue, please make
sure there isn't already a prior issue concerning this. If there is, please join that discussion instead.
- type: textarea
id: enhancement-proposal
attributes:
label: Enhancement Proposal
description: >
Describe the enhancement you would like to see in as much detail as needed.
validations:
required: true
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Issue
<!-- What issue is this PR trying to solve? -->


## Solution
<!-- A summary of the solution addressing the above issue -->


## Context
<!-- What is some specialized knowledge relevant to this project/technology -->


## Testing Instructions
<!-- What steps need to be taken to test this PR? -->


## Upgrade Notes
<!-- To upgrade from an older revision of charmed prometheus, ... -->
11 changes: 11 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Issues

on: [issues]

jobs:
update:
name: Update Issue
uses: canonical/observability/.github/workflows/issues.yaml@main
secrets: inherit
with:
component: istio
20 changes: 20 additions & 0 deletions .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Promote Charm

on:
workflow_dispatch:
inputs:
promotion:
type: choice
description: Channel to promote from
options:
- edge -> beta
- beta -> candidate
- candidate -> stable

jobs:
promote:
name: Promote
uses: canonical/observability/.github/workflows/charm-promote.yaml@main
with:
promotion: ${{ github.event.inputs.promotion }}
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Pull Requests

on:
pull_request:
branches:
- main

jobs:
pull-request:
name: PR
uses: canonical/observability/.github/workflows/charm-pull-request.yaml@main
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Charm to Edge and Publish Libraries

on:
workflow_dispatch: {}
push:
branches:
- main

jobs:
release:
uses: canonical/observability/.github/workflows/charm-release.yaml@main
secrets: inherit
with:
build-for-arm: true
14 changes: 14 additions & 0 deletions .github/workflows/update-libs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto-update Charm Libraries
on:
# Manual trigger
workflow_dispatch:
# Check regularly the upstream every four hours
schedule:
- cron: "0 0,4,8,12,16,20 * * *"

jobs:
update-lib:
name: Check libraries
uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main
secrets: inherit

11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
venv/
build/
*.charm
.coverage
__pycache__/
*.py[cod]
.tox
.idea/
tests/integration/*-tester/lib/
.env
.vscode/
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing
![GitHub License](https://img.shields.io/github/license/canonical/istio-core-operator)
![GitHub Commit Activity](https://img.shields.io/github/commit-activity/y/canonical/istio-core-operator)
![GitHub Lines of Code](https://img.shields.io/tokei/lines/github/canonical/istio-core-operator)
![GitHub Issues](https://img.shields.io/github/issues/canonical/istio-core-operator)
![GitHub PRs](https://img.shields.io/github/issues-pr/canonical/istio-core-operator)
![GitHub Contributors](https://img.shields.io/github/contributors/canonical/istio-core-operator)
![GitHub Watchers](https://img.shields.io/github/watchers/canonical/istio-core-operator?style=social)

## Development environment

To make contributions to this charm, you'll need a working [development setup](https://juju.is/docs/sdk/dev-setup).

You can create an environment for development with `tox`:

```shell
tox devenv -e integration
source venv/bin/activate
```

## Testing

This project uses `tox` for managing test environments. There are some pre-configured environments
that can be used for linting and formatting code when you're preparing contributions to the charm:

```shell
tox run -e format # update your code according to linting rules
tox run -e lint # code style
tox run -e static # static type checking
tox run -e unit # unit tests
tox run -e scenario # scenario tests
tox run -e integration # integration tests
tox # runs 'format', 'lint', 'static', 'unit', 'scenario', and 'integration' environments
```

## Build the charm

Build the charm in this git repository using:

```shell
charmcraft pack
```
Loading

0 comments on commit 5e2fbdc

Please sign in to comment.