mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
delete unused functions in pkg/controller directory
This commit is contained in:
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package statefulset
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
@@ -481,18 +480,6 @@ func newVersionedStatefulSetPod(currentSet, updateSet *apps.StatefulSet, current
|
||||
return pod
|
||||
}
|
||||
|
||||
// Match check if the given StatefulSet's template matches the template stored in the given history.
|
||||
func Match(ss *apps.StatefulSet, history *apps.ControllerRevision) (bool, error) {
|
||||
// Encoding the set for the patch may update its GVK metadata, which causes data races if this
|
||||
// set is in an informer cache.
|
||||
clone := ss.DeepCopy()
|
||||
patch, err := getPatch(clone)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return bytes.Equal(patch, history.Data.Raw), nil
|
||||
}
|
||||
|
||||
// getPatch returns a strategic merge patch that can be applied to restore a StatefulSet to a
|
||||
// previous version. If the returned error is nil the patch is valid. The current state that we save is just the
|
||||
// PodSpecTemplate. We can modify this later to encompass more state (or less) and remain compatible with previously
|
||||
|
||||
Reference in New Issue
Block a user