mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pkg/util/config into pkg/kubelet/config
This commit is contained in:
parent
049261aca1
commit
01155f59c3
@ -32,7 +32,6 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/kubelet/events"
|
"k8s.io/kubernetes/pkg/kubelet/events"
|
||||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/util/format"
|
"k8s.io/kubernetes/pkg/kubelet/util/format"
|
||||||
"k8s.io/kubernetes/pkg/util/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// PodConfigNotificationMode describes how changes are sent to the update channel.
|
// PodConfigNotificationMode describes how changes are sent to the update channel.
|
||||||
@ -61,7 +60,7 @@ type podStartupSLIObserver interface {
|
|||||||
// in order.
|
// in order.
|
||||||
type PodConfig struct {
|
type PodConfig struct {
|
||||||
pods *podStorage
|
pods *podStorage
|
||||||
mux *config.Mux
|
mux *Mux
|
||||||
|
|
||||||
// the channel of denormalized changes passed to listeners
|
// the channel of denormalized changes passed to listeners
|
||||||
updates chan kubetypes.PodUpdate
|
updates chan kubetypes.PodUpdate
|
||||||
@ -78,7 +77,7 @@ func NewPodConfig(mode PodConfigNotificationMode, recorder record.EventRecorder,
|
|||||||
storage := newPodStorage(updates, mode, recorder, startupSLIObserver)
|
storage := newPodStorage(updates, mode, recorder, startupSLIObserver)
|
||||||
podConfig := &PodConfig{
|
podConfig := &PodConfig{
|
||||||
pods: storage,
|
pods: storage,
|
||||||
mux: config.NewMux(storage),
|
mux: NewMux(storage),
|
||||||
updates: updates,
|
updates: updates,
|
||||||
sources: sets.String{},
|
sources: sets.String{},
|
||||||
}
|
}
|
||||||
@ -478,7 +477,6 @@ func (s *podStorage) Sync() {
|
|||||||
s.updates <- kubetypes.PodUpdate{Pods: s.MergedState().([]*v1.Pod), Op: kubetypes.SET, Source: kubetypes.AllSource}
|
s.updates <- kubetypes.PodUpdate{Pods: s.MergedState().([]*v1.Pod), Op: kubetypes.SET, Source: kubetypes.AllSource}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object implements config.Accessor
|
|
||||||
func (s *podStorage) MergedState() interface{} {
|
func (s *podStorage) MergedState() interface{} {
|
||||||
s.podLock.RLock()
|
s.podLock.RLock()
|
||||||
defer s.podLock.RUnlock()
|
defer s.podLock.RUnlock()
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2014 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package config provides utility objects for decoupling sources of configuration and the
|
|
||||||
// actual configuration state. Consumers must implement the Merger interface to unify
|
|
||||||
// the sources of change into an object.
|
|
||||||
package config // import "k8s.io/kubernetes/pkg/util/config"
|
|
Loading…
Reference in New Issue
Block a user