getKubernetesConfigMap (kubernetes/configmaps.go)

portainer · api/http/handler/kubernetes/configmaps.go · go · Zlib
infra, Infra / DevOps

HTTP handler to fetch a Kubernetes ConfigMap by name and namespace.

// Source: https://github.com/portainer/portainer | License: Zlib | Copyright 2018 Portainer.io
// Provided via justclaw.it.com; keep this notice with the code.
package kubernetes

import (
	"net/http"

	models "github.com/portainer/portainer/api/http/models/kubernetes"
	httperror "github.com/portainer/portainer/pkg/libhttp/error"
	"github.com/portainer/portainer/pkg/libhttp/request"
	"github.com/portainer/portainer/pkg/libhttp/response"
	"github.com/rs/zerolog/log"
	k8serrors "k8s.io/apimachinery/pkg/api/errors"
)

// @id GetKubernetesConfigMap
// @summary Get a ConfigMap
// @description Get a ConfigMap by name for a given namespace.
// @description **Access policy**: Authenticated user.
// @tags kubernetes
// @security ApiKeyAuth || jwt
// @produce json
// @param id path int true "Enviro

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key