Skip to content

Commit

Permalink
Update to direct towards a k8s charm
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Dec 4, 2023
1 parent 9152535 commit 9c3d4b8
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 80 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/inclusive_naming_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Test Suite
on: [pull_request]

jobs:
call-inclusive-naming-check:
name: Inclusive naming
uses: canonical/inclusive-naming/.github/workflows/woke.yaml@main
with:
fail-on-error: "true"
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @canonical/is-charms
* @canonical/kubernetes
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,34 @@ Avoid using this README file for information that is maintained or published els
Use links instead.
-->

# is-charms-template
# k8s charms

Charmhub package name: operator-template
More information: https://charmhub.io/is-charms-template
[![Unit Tests](https://github.com/canonical/k8s-operator/actions/workflows/test.yaml/badge.svg)](https://github.com/canonical/k8s-operator/actions/workflows/test.yaml)
[![Integration Tests](https://github.com/canonical/k8s-operator/actions/workflows/integration_test.yaml/badge.svg)](https://github.com/canonical/k8s-operator/actions/workflows/integration_test.yaml)

Describe your charm in one or two sentences.
Charmhub package name: k8s
More information: https://charmhub.io/k8s

## Other resources
A machine charm which operates a complete Kubernetes cluster.

This charm installs and operates a Kubernetes cluster via the k8s snap. It exposes
relations to co-operate with other kubernetes components such as optional CNIs,
optional cloud-providers, optional schedulers, external backing stores, and external
certificate managers.

<!-- If your charm is documented somewhere else other than Charmhub, provide a link separately. -->
This charm provides the following running components:
* kube-apiserver
* kube-scheduler
* kube-controller-manager
* kube-proxy
* kubelet
* containerd

- [Read more](https://example.com)
This charm can optionally disable the following components:
* A Kubernetes Backing Store
* A Kubernetes CNI

## Other resources

- [Contributing](CONTRIBUTING.md) <!-- or link to other contribution documentation -->

Expand Down
16 changes: 0 additions & 16 deletions config.yaml

This file was deleted.

66 changes: 27 additions & 39 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,36 @@
# This file populates the Overview on Charmhub.
# See https://juju.is/docs/sdk/metadata-reference for a checklist and guidance.

# The charm package name, no spaces (required)
# See https://juju.is/docs/sdk/naming#heading--naming-charms for guidance.
name: is-charms-template

# The following metadata are human-readable and will be published prominently on Charmhub.

# (Recommended)
display-name: Charm Template
name: k8s
display-name: Kubernetes

# (Required)
summary: A very short one-line summary of the charm.
summary: A machine charm for K8s
docs: https://discourse.charmhub.io
issues: https://github.com/canonical/is-charms-template-repo/issues
issues: https://github.com/canonical/k8s-operator/issues
maintainers:
- https://launchpad.net/~canonical-is-devops
source: https://github.com/canonical/is-charms-template-repo

description: |
A single sentence that says what the charm is, concisely and memorably.
A paragraph of one to three short sentences, that describe what the charm does.
- https://launchpad.net/~containers
source: https://github.com/canonical/k8s-operator

A third paragraph that explains what need the charm meets.
assumes:
- juju > 3.1

Finally, a paragraph that describes whom the charm is useful for.
# The containers and resources metadata apply to Kubernetes charms only.
# Remove them if not required.

# Your workload’s containers.
containers:
httpbin:
resource: httpbin-image

# This field populates the Resources tab on Charmhub.
resources:
# An OCI image resource for each container listed above.
# You may remove this if your charm will run without a workload sidecar container.
httpbin-image:
type: oci-image
description: OCI image for httpbin
# The upstream-source field is ignored by Juju. It is included here as a reference
# so the integration testing suite knows which image to deploy during testing. This field
# is also used by the 'canonical/charming-actions' Github action for automated releasing.
upstream-source: kennethreitz/httpbin
description: |
A machine charm which operates a complete Kubernetes cluster.
This charm installs and operates a Kubernetes cluster via the k8s snap. It exposes
relations to co-operate with other kubernetes components such as optional CNIs,
optional cloud-providers, optional schedulers, external backing stores, and external
certificate storage.
This charm provides the following running components:
* kube-apiserver
* kube-scheduler
* kube-controller-manager
* kube-proxy
* kubelet
* containerd
This charm can optionally disable the following components:
* A Kubernetes Backing Store
* A Kubernetes CNI
1 change: 0 additions & 1 deletion tests/unit/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import ops
import ops.testing

from charm import IsCharmsTemplateCharm


Expand Down
21 changes: 5 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,24 @@ passenv =
CHARM_BUILD_DIR
MODEL_SETTINGS

[testenv:fmt]
[testenv:format]
description = Apply coding style standards to code
deps =
black
isort
ruff
commands =
isort {[vars]all_path}
black {[vars]all_path}
ruff {[vars]all_path} --fix

[testenv:lint]
description = Check code against coding style standards
deps =
black
codespell
flake8<6.0.0
flake8-builtins
flake8-copyright<6.0.0
flake8-docstrings>=1.6.0
flake8-docstrings-complete>=1.0.3
flake8-test-docs>=1.0
isort
ruff
mypy
pep8-naming
pydocstyle>=2.10
pylint
pyproject-flake8<6.0.0
pytest
pytest-asyncio
pytest-operator
Expand All @@ -56,15 +48,12 @@ deps =
types-requests
-r{toxinidir}/requirements.txt
commands =
pydocstyle {[vars]src_path}
# uncomment the following line if this charm owns a lib
# codespell {[vars]lib_path}
codespell {toxinidir} --skip {toxinidir}/.git --skip {toxinidir}/.tox \
--skip {toxinidir}/build --skip {toxinidir}/lib --skip {toxinidir}/venv \
--skip {toxinidir}/.mypy_cache --skip {toxinidir}/icon.svg
# pflake8 wrapper supports config from pyproject.toml
pflake8 {[vars]all_path} --ignore=W503
isort --check-only --diff {[vars]all_path}
ruff {[vars]all_path}
black --check --diff {[vars]all_path}
mypy {[vars]all_path}
pylint {[vars]all_path}
Expand Down

0 comments on commit 9c3d4b8

Please sign in to comment.