File tree Expand file tree Collapse file tree 5 files changed +10
-23
lines changed
Expand file tree Collapse file tree 5 files changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,6 @@ required = [
4747 branch = " master"
4848 name = " golang.org/x/crypto"
4949
50- [[constraint ]]
51- name = " gopkg.in/yaml.v2"
52- version = " 2.2.8"
53-
5450[[constraint ]]
5551 name = " k8s.io/api"
5652 version = " 0.17.4"
Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ limitations under the License.
1818import (
1919 "bytes"
2020 "errors"
21+
2122 log "github.com/sirupsen/logrus"
22- "gopkg.in /yaml.v2 "
23+ "sigs.k8s.io /yaml"
2324)
2425
2526type LoadConfig struct {
Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ import (
2626
2727 crv1 "github.com/crunchydata/postgres-operator/apis/crunchydata.com/v1"
2828 "github.com/crunchydata/postgres-operator/kubeapi"
29+
2930 log "github.com/sirupsen/logrus"
30- "gopkg.in/yaml.v2"
3131 v1 "k8s.io/api/core/v1"
32+ "k8s.io/apimachinery/pkg/api/resource"
3233 "k8s.io/apimachinery/pkg/util/validation"
3334 "k8s.io/client-go/kubernetes"
35+ "sigs.k8s.io/yaml"
3436)
3537
3638const CustomConfigMapName = "pgo-config"
@@ -393,20 +395,6 @@ func (c *PgoConfig) Validate() error {
393395 return err
394396}
395397
396- func (c * PgoConfig ) GetConf () * PgoConfig {
397-
398- yamlFile , err := ioutil .ReadFile (CONFIG_PATH )
399- if err != nil {
400- log .Printf ("yamlFile.Get err #%v " , err )
401- }
402- err = yaml .Unmarshal (yamlFile , c )
403- if err != nil {
404- log .Fatalf ("Unmarshal: %v" , err )
405- }
406-
407- return c
408- }
409-
410398// GetPodAntiAffinitySpec accepts possible user-defined values for what the
411399// pod anti-affinity spec should be, which include rules for:
412400// - PostgreSQL instances
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ package cmd
1818import (
1919 "encoding/json"
2020 "fmt"
21+ "os"
22+
2123 msgs "github.com/crunchydata/postgres-operator/apiservermsgs"
2224 "github.com/crunchydata/postgres-operator/pgo/api"
25+
2326 log "github.com/sirupsen/logrus"
24- "gopkg.in/yaml.v2"
25- "os"
27+ "sigs.k8s.io/yaml"
2628)
2729
2830func showConfig (args []string , ns string ) {
You can’t perform that action at this time.
0 commit comments