MCPcopy Index your code
hub / github.com/AxaFrance/dailyclean

github.com/AxaFrance/dailyclean @v1.14.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.14.1 ↗ · + Follow
266 symbols 832 edges 71 files 40 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DailyClean

workflow Code Smells Docker API Docker JOB

DailyClean

About

Daily clean is all you to turn on or off automatically or manually all your pods your kubernetes namespace. Save the planet with DailyClean. Daily clean only use kubernetes native API.

DailyClean Automation

Getting Started

To test dailyclean on your local machine by using kubernetes with Docker Desktop, please use these commands:

git clone https://github.com/AxaGuilDEv/dailyclean.git
cd dailyclean/demo
kubectl create namespace license-preproduction
kubectl config set-context --current --namespace=license-preproduction
# Create a custom service account
kubectl apply -f dailyclean-serviceaccount.yml
# Install dailyclean for the dailyclean service account
kubectl apply -f deployment-dailyclean.yml
# Install three instances of kubernetes-bootcamp
kubectl apply -f deployment-others.yml
# Install MySql
kubectl apply -f deployment-mysql.yml

Now, open your favorite browser and enter the url of dailyclean-api service : http://localhost:30001

Enjoy dailyclean !!!!

How Does It Work

  • Daily clean use native kubernetes API, it works with any kubernetes projects. DailyClean is a pod that have to be install in your namespace. It create cron job that start or stop your pods.
  • API is in native GraalVM so it is lightweight.
  • User interface is in React/Javascript.

you can use specific labels to configure DailyClean in your Kubernetes scripts:

metadata:
  name: my-api
  labels:
    # if false, dailyclean will not stop this pod for deployment
    axa.com/dailyclean: 'false'
    # WARNING: default value is true for DEPLOYMENT and false for STATEFULTSET
metadata:
  name: fibonacci1
  labels:
    # if true, dailyclean web UI will consider this pod as a function
    axa.com/function: 'true'

Configure your DailyClean

Environment Variable Description Default value
SERVICE_UNAUTHORIZED_NAMESPACE_REGEX If needed, it is possible to specify a regex matching the Kubernetes namespaces on which the automatic start or stop actions should not be applied

Contribute

Authors

The awesome team :

Extension points exported contracts — how you extend this code

IWorkloadWrapper (Interface)
(no doc) [2 implementers]
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/IWorkloadWrapper.java
FormStateContainerProps (Interface)
(no doc)
api/web/src/FormStateContainer.tsx
WithResilienceProps (Interface)
(no doc)
api/web/src/withResilience.tsx
AppProps (Interface)
(no doc)
api/web/src/App.tsx
TemplateArgs (Interface)
(no doc)
api/web/src/FormConfigurationContainer.stories.tsx
FormConfigurationContainerProps (Interface)
(no doc)
api/web/src/FormConfigurationContainer.tsx

Core symbols most depended-on inside this repo

get
called by 67
api/api/src/main/java/fr/axa/openpaas/dailyclean/resource/TimeRangesResource.java
getSpec
called by 51
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/IWorkloadWrapper.java
getMetadata
called by 25
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/IWorkloadWrapper.java
getCronName
called by 23
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/KubernetesUtils.java
getName
called by 23
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/KubernetesUtils.java
mapWorkload
called by 17
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/KubernetesUtils.java
formatPrice
called by 12
api/web/src/ListState.tsx
getPlaceholder
called by 11
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/ScriptPlaceholder.java

Shape

Method 130
Function 91
Class 27
Interface 15
Enum 3

Languages

Java61%
TypeScript38%
Python2%

Modules by API surface

api/api/src/main/java/fr/axa/openpaas/dailyclean/service/KubernetesService.java24 symbols
api/web/src/ListState.tsx15 symbols
api/web/src/FormConfigurationContainer.tsx15 symbols
api/api/src/test/java/fr/axa/openpaas/dailyclean/resource/StatusResourceTest.java15 symbols
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/KubernetesUtils.java14 symbols
api/api/src/test/java/fr/axa/openpaas/dailyclean/resource/TimeRangesResourceTest.java12 symbols
api/web/src/validation.ts10 symbols
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/StatefulSetWrapper.java10 symbols
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/DeploymentWrapper.java10 symbols
api/api/src/main/java/fr/axa/openpaas/dailyclean/util/wrapper/IWorkloadWrapper.java9 symbols
api/web/src/mocks/mockState.ts7 symbols
api/web/public/mockServiceWorker.js7 symbols

For agents

$ claude mcp add dailyclean \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page