This HTTP server provides an API for updating and retrieving Kubernetes ConfigMaps. It can be run within a Docker container and deployed in a Kubernetes cluster.
docker pull modulairy/k8s-configmap-api-server:latest
docker run -p 8080:8080 modulairy/k8s-configmap-api-server:latest
Clone the Repository:
git clone https://github.com/your-username/your-repo.git
cd your-repo
Build the Docker Image:
docker build -t configmap-api-server:latest .
This command will build a Docker image named configmap-api-server using the provided Dockerfile.
Run the Docker Container:
docker run -p 8080:8080 -e PERMIT_CONFIG_NAME=your_config_name -e PERMIT_NAMESPACE=your_namespace -e PERMIT_CONFIG_KEY=your_config_key configmap-api-server:latest
Replace your_config_name, your_namespace, and your_config_key with the appropriate values.
your_config_name: The name of the ConfigMap to be updated or retrieved.your_namespace: The namespace in which the ConfigMap resides.your_config_key: The key within the ConfigMap where the data will be stored.The server will start and listen on port 8080.
/health/configsubscriptionId (optional): Namespace of the ConfigMap.configName (optional): Name of the ConfigMap.configKey (optional): Key within the ConfigMap where the data will be stored./configsubscriptionId (optional): Namespace of the ConfigMap.configName (optional): Name of the ConfigMap.configKey (optional): Key within the ConfigMap to retrieve data from.To update a ConfigMap, send a PUT request to /config with the appropriate query parameters and JSON data in the request body.
Example:
curl -X PUT -H "Content-Type: application/json" -d '{"key": "value"}' http://localhost:8080/config?subscriptionId=default&configName=my-config&configKey=data
To retrieve data from a ConfigMap, send a GET request to /config with the appropriate query parameters.
Example:
curl http://localhost:8080/config?subscriptionId=default&configName=my-config&configKey=data
Note: Replace the query parameters with your specific values.
Content type
Image
Digest
sha256:4a5829830…
Size
23.3 MB
Last updated
over 2 years ago
docker pull modulairy/k8s-configmap-api-server