Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -47,7 +47,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
15 changes: 15 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[MESSAGES CONTROL]
# Protected access is intentional for patching kasa internals
# Broad exceptions are used intentionally for device communication resilience
disable=
protected-access,
broad-exception-caught,
import-outside-toplevel,
too-many-locals

[FORMAT]
max-line-length=120

[BASIC]
good-names=
i,j,k,e,v,gl,idx,val,exc,o_cfg,_idx
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ LABEL org.opencontainers.image.description="Prometheus exporter for TP-Link Kasa

WORKDIR /app

# Install python-kasa with speedups for optimized JSON parsing
RUN pip install --no-cache-dir "python-kasa[speedups]" prometheus_client pyyaml
# Install dependencies including tzdata for timezone resolution
RUN pip install --no-cache-dir "python-kasa[speedups]" prometheus_client pyyaml tzdata

COPY kasa-exporter.py exporter.py
COPY kasa_exporter.py exporter.py

EXPOSE 9233

CMD ["python", "exporter.py"]
CMD ["python", "exporter.py"]
310 changes: 0 additions & 310 deletions kasa-exporter.py

This file was deleted.

Loading
Loading