Skip to content

Commit

Permalink
add flow reconciler to remove terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Mar 10, 2023
1 parent a623cf9 commit 5a7f047
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 260 deletions.
33 changes: 7 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0
github.com/coreos/go-systemd/v22 v22.3.2
github.com/gardener/etcd-druid v0.15.3
github.com/gardener/gardener v1.65.0
github.com/gardener/gardener-extension-networking-calico v1.27.1
github.com/gardener/gardener-extension-networking-cilium v1.18.0
github.com/gardener/machine-controller-manager v0.45.0
github.com/gardener/etcd-druid v0.15.3
github.com/gardener/gardener v1.65.0
github.com/gardener/gardener-extension-networking-calico v1.27.1
github.com/gardener/gardener-extension-networking-cilium v1.18.0
github.com/gardener/machine-controller-manager v0.45.0
github.com/gardener/remedy-controller v0.6.0
github.com/go-logr/logr v1.2.3
github.com/gofrs/uuid v4.2.0+incompatible
Expand All @@ -52,12 +46,6 @@ require (
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.14.4
sigs.k8s.io/controller-tools v0.11.3
k8s.io/code-generator v0.26.1
k8s.io/component-base v0.26.1
k8s.io/kubelet v0.26.1
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.14.4
sigs.k8s.io/controller-tools v0.11.3
)

require (
Expand All @@ -74,21 +62,17 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bronze1man/yaml2json v0.0.0-20211227013850-8972abeaea25 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gardener/hvpa-controller/api v0.5.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
Expand All @@ -99,14 +83,14 @@ require (
github.com/gobuffalo/flect v0.3.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand Down Expand Up @@ -169,14 +153,11 @@ require (
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
istio.io/api v0.0.0-20220304035241-8c47cbbea144 // indirect
istio.io/client-go v1.12.5 // indirect
istio.io/gogo-genproto v0.0.0-20210113155706-4daf5697332f // indirect
k8s.io/apiserver v0.23.3 // indirect
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
istio.io/api v0.0.0-20221013011440-bc935762d2b9 // indirect
istio.io/client-go v1.15.3 // indirect
k8s.io/apiserver v0.26.1 // indirect
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
k8s.io/helm v2.16.1+incompatible // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
Expand Down
16 changes: 0 additions & 16 deletions pkg/controller/infrastructure/mock/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@
// 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.

<<<<<<<< HEAD:vendor/github.com/gardener/gardener/pkg/utils/gardener/controllerinstallation.go
package gardener

import (
"fmt"

gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
)

// NamespaceNameForControllerInstallation returns the name of the namespace that will be used for the extension controller in the seed.
func NamespaceNameForControllerInstallation(controllerInstallation *gardencorev1beta1.ControllerInstallation) string {
return fmt.Sprintf("extension-%s", controllerInstallation.Name)
}
========
//go:generate mockgen -package infrastructure -destination=mocks.go github.com/gardener/gardener-extension-provider-azure/pkg/controller/infrastructure Reconciler

package infrastructure
>>>>>>>> e256c21f (add flow reconciler to remove terraform):pkg/controller/infrastructure/mock/doc.go
9 changes: 0 additions & 9 deletions test/integration/bastion/bastion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ func checkSecurityRuleDoesNotExist(ctx context.Context, az *azureClientSet, opti
Expect(ignoreAzureNotFoundError(err)).To(Succeed())
}

<<<<<<< HEAD
=======
// ruleExist is similar to bastionctrl.RuleExist but for the old network client
func ruleExist(ruleName *string, rules *[]network.SecurityRule) bool {
if ruleName == nil {
Expand All @@ -690,23 +688,16 @@ func ruleExist(ruleName *string, rules *[]network.SecurityRule) bool {
return false
}

>>>>>>> e256c21f (add flow reconciler to remove terraform)
func verifyCreation(ctx context.Context, az *azureClientSet, options *bastionctrl.Options) {
By("RuleExist")
// does not have authorization to performsecurityRules get due to global rule. use security group to check it.
sg, err := az.securityGroups.Get(ctx, options.ResourceGroupName, options.SecurityGroupName, "")
Expect(err).NotTo(HaveOccurred())

// bastion NSG - Check Ingress / Egress firewalls created
<<<<<<< HEAD
bastionctrl.RuleExist(pointer.String(bastionctrl.NSGIngressAllowSSHResourceNameIPv4(options.BastionInstanceName)), sg.SecurityRules)
bastionctrl.RuleExist(pointer.String(bastionctrl.NSGEgressDenyAllResourceName(options.BastionInstanceName)), sg.SecurityRules)
bastionctrl.RuleExist(pointer.String(bastionctrl.NSGEgressAllowOnlyResourceName(options.BastionInstanceName)), sg.SecurityRules)
=======
ruleExist(pointer.StringPtr(bastionctrl.NSGIngressAllowSSHResourceNameIPv4(options.BastionInstanceName)), sg.SecurityRules)
ruleExist(pointer.StringPtr(bastionctrl.NSGEgressDenyAllResourceName(options.BastionInstanceName)), sg.SecurityRules)
ruleExist(pointer.StringPtr(bastionctrl.NSGEgressAllowOnlyResourceName(options.BastionInstanceName)), sg.SecurityRules)
>>>>>>> e256c21f (add flow reconciler to remove terraform)

By("checking bastion instance")
// bastion instance
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/google/uuid/hash.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 0 additions & 118 deletions vendor/github.com/google/uuid/null.go

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/github.com/google/uuid/sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a7f047

Please sign in to comment.