Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ require (
k8s.io/component-base v0.27.3
k8s.io/kubectl v0.27.3
k8s.io/kubelet v0.27.3
k8s.io/kubernetes v1.27.3
k8s.io/utils v0.0.0-20230505201702-9f6742963106
sigs.k8s.io/controller-runtime v0.13.0
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1667,8 +1667,6 @@ k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw=
k8s.io/kubectl v0.27.3/go.mod h1:g9OQNCC2zxT+LT3FS09ZYqnDhlvsKAfFq76oyarBcq4=
k8s.io/kubelet v0.27.3 h1:5WhTV1iiBu9q/rr+gvy65LQ+K/e7dmgcaYjys5ipLqY=
k8s.io/kubelet v0.27.3/go.mod h1:Mz42qgZZgWgPmOJEYaR5evmh+EoSwFzEvPBozA2y9mg=
k8s.io/kubernetes v1.27.3 h1:gwufSj7y6X18Q2Gl8v4Ev+AJHdzWkG7A8VNFffS9vu0=
k8s.io/kubernetes v1.27.3/go.mod h1:U8ZXeKBAPxeb4J4/HOaxjw1A9K6WfSH+fY2SS7CR6IM=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU=
Expand Down
23 changes: 20 additions & 3 deletions pkg/controller/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import (
"k8s.io/client-go/tools/record"
"k8s.io/client-go/tools/reference"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/credentialprovider"

mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
mcfgclientset "github.com/openshift/machine-config-operator/pkg/generated/clientset/versioned"
Expand Down Expand Up @@ -1167,10 +1166,28 @@ func IsLayeredPool(pool *mcfgv1.MachineConfigPool) bool {
return false
}

// DockerConfigJSON represents ~/.docker/config.json file info
type DockerConfigJSON struct {
Auths DockerConfig `json:"auths"`
}

// DockerConfig represents the config file used by the docker CLI.
// This config that represents the credentials that should be used
// when pulling images from specific image repositories.
type DockerConfig map[string]DockerConfigEntry

// DockerConfigEntry wraps a docker config as a entry
type DockerConfigEntry struct {
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
Auth string `json:"auth"`
}

// Merges kubernetes.io/dockercfg type secrets into a JSON map.
// Returns an error on failure to marshal the incoming secret.
func MergeDockerConfigstoJSONMap(secretRaw []byte, auths map[string]credentialprovider.DockerConfigEntry) error {
var dockerConfig credentialprovider.DockerConfig
func MergeDockerConfigstoJSONMap(secretRaw []byte, auths map[string]DockerConfigEntry) error {
var dockerConfig DockerConfig
// Unmarshal raw JSON
err := json.Unmarshal(secretRaw, &dockerConfig)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/operator/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/credentialprovider"

configv1 "github.com/openshift/api/config/v1"
"github.com/openshift/library-go/pkg/operator/resource/resourceapply"
Expand Down Expand Up @@ -1519,9 +1518,10 @@ func (optr *Operator) getImageRegistryPullSecrets() ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("failed to retrieve dns object")
}

// Create the JSON map
dockerConfigJSON := credentialprovider.DockerConfigJSON{
Auths: map[string]credentialprovider.DockerConfigEntry{},
dockerConfigJSON := ctrlcommon.DockerConfigJSON{
Auths: map[string]ctrlcommon.DockerConfigEntry{},
}

// Get the list of image pull secrets from the designated service account
Expand Down
4 changes: 0 additions & 4 deletions vendor/k8s.io/apiserver/pkg/features/OWNERS

This file was deleted.

283 changes: 0 additions & 283 deletions vendor/k8s.io/apiserver/pkg/features/kube_features.go

This file was deleted.

33 changes: 0 additions & 33 deletions vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go

This file was deleted.

Loading