func (info *K8SInfo) ExtractK8sLabels(containerInfo *docker.Container) {
	info.mu.Lock()
	defer info.mu.Unlock()
	// only pause container has k8s labels
	if info.ContainerName == "POD" || info.ContainerName == "pause" {
		info.PausedContainer = true
		if info.Labels == nil {
			info.Labels = make(map[string]string)
		}
		for key, val := range containerInfo.Config.Labels {
			if strings.HasPrefix(key, k8sInnerLabelPrefix) || strings.HasPrefix(key, k8sInnerAnnotationPrefix) {
				continue
			}
			info.Labels[key] = val
		}
	}
}
// ExtractK8sLabels only work for original docker container.
ExtractK8sLabels only work for original docker container.
// ExtractK8sLabels only work for original docker container .
func (info *K8SInfo) ExtractK8sLabels(containerInfo *docker.Container) {
	info.mu.Lock()
	defer info.mu.Unlock()
	if info.ContainerName == "POD" || info.ContainerName == "pause" {
		info.PausedContainer = true
		if info.Labels == nil {
			info.Labels = make(map[string]string)
		}
		for key, val := range containerInfo.Config.Labels {
			if strings.HasPrefix(key, k8sInnerLabelPrefix) || strings.HasPrefix(key, k8sInnerAnnotationPrefix) {
				continue
			}
			info.Labels[key] = val
		}
	}
}
func ( info * K8SInfo ) ExtractK8sLabels ( containerInfo * docker . Container ) { info . mu . Lock ( ) defer info . mu . Unlock ( ) if info . ContainerName == " " || info . ContainerName == " " { info . PausedContainer = true if info . Labels == nil { info . Labels = make ( map [ string ] string ) } for key , val := range containerInfo . Config . Labels { if strings . HasPrefix ( key , k8sInnerLabelPrefix ) || strings . HasPrefix ( key , k8sInnerAnnotationPrefix ) { continue } info . Labels [ key ] = val } } }
ExtractK8sLabels only work for original docker container.
ExtractK8sLabels only work for original docker container .
// only pause container has k8s labels