Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
missylbytes committed Aug 7, 2023
1 parent d68fbf3 commit 57b7543
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
6 changes: 1 addition & 5 deletions charts/consul/templates/connect-inject-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,7 @@ spec:
{{- if .Values.global.openshift.enabled }}
-enable-openshift \
{{- end }}
{{- if ne .Values.connectInject.apiGateway.openshiftSccName ""}}
-openshift-scc-name={{ .Values.connectInject.apiGateway.openshiftSccName }} \
{{- else }}
-openshift-scc-name={{ template "consul.fullname" . }}-api-gateway \
{{- end }}
-openshift-scc-name={{ .Values.connectInject.apiGateway.openshiftSccName }}
{{- if .Values.connectInject.transparentProxy.defaultOverwriteProbes }}
-transparent-proxy-default-overwrite-probes=true \
{{- else }}
Expand Down
1 change: 1 addition & 0 deletions control-plane/api-gateway/gatekeeper/gatekeeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func New(log logr.Logger, client client.Client) *Gatekeeper {
// This is done in order based on dependencies between resources.
func (g *Gatekeeper) Upsert(ctx context.Context, gateway gwv1beta1.Gateway, gcc v1alpha1.GatewayClassConfig, config common.HelmConfig) error {
g.Log.V(1).Info(fmt.Sprintf("Upsert Gateway Deployment %s/%s", gateway.Namespace, gateway.Name))

if err := g.upsertRole(ctx, gateway, gcc, config); err != nil {
return err
}
Expand Down
49 changes: 0 additions & 49 deletions control-plane/api-gateway/gatekeeper/gatekeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,55 +828,6 @@ func TestDelete(t *testing.T) {
serviceAccounts: []*corev1.ServiceAccount{},
},
},
"delete a gateway deployment with openshiftEnabled": {
gateway: gwv1beta1.Gateway{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Spec: gwv1beta1.GatewaySpec{
Listeners: listeners,
},
},
gatewayClassConfig: v1alpha1.GatewayClassConfig{
ObjectMeta: metav1.ObjectMeta{
Name: "consul-gatewayclassconfig",
},
Spec: v1alpha1.GatewayClassConfigSpec{
DeploymentSpec: v1alpha1.DeploymentSpec{
DefaultInstances: common.PointerTo(int32(3)),
MaxInstances: common.PointerTo(int32(3)),
MinInstances: common.PointerTo(int32(1)),
},
CopyAnnotations: v1alpha1.CopyAnnotationsSpec{},
ServiceType: (*corev1.ServiceType)(common.PointerTo("NodePort")),
},
},
helmConfig: common.HelmConfig{
EnableOpenShift: true,
},
initialResources: resources{
deployments: []*appsv1.Deployment{
configureDeployment(name, namespace, labels, 3, nil, nil, "", "1"),
},
roles: []*rbac.Role{
configureRole(name, namespace, labels, "1", true),
},
roleBindings: []*rbac.RoleBinding{
configureRoleBinding(name, namespace, labels, "1"),
},
services: []*corev1.Service{},
serviceAccounts: []*corev1.ServiceAccount{
configureServiceAccount(name, namespace, labels, "1"),
},
},
finalResources: resources{
deployments: []*appsv1.Deployment{},
roles: []*rbac.Role{},
services: []*corev1.Service{},
serviceAccounts: []*corev1.ServiceAccount{},
},
},
}

for name, tc := range cases {
Expand Down

0 comments on commit 57b7543

Please sign in to comment.