Skip to content

Commit

Permalink
feat(deployments) Remove unnecessary controller deployment part (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
gciezkowski-acc committed Jan 30, 2025
1 parent 8e9f811 commit 7f83726
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
12 changes: 0 additions & 12 deletions charts/manager/templates/deployment-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ spec:
periodSeconds: 20
name: manager
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
- containerPort: 8080
name: metrics
- containerPort: 8081
Expand All @@ -77,16 +74,7 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
securityContext: {{- toYaml .Values.controllerManager.containerSecurityContext | nindent 10 }}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
securityContext:
runAsNonRoot: true
serviceAccountName: {{ include "manager.fullname" . }}-controller-manager
terminationGracePeriodSeconds: 10
volumes:
- name: cert
secret:
defaultMode: 420
secretName: {{ include "manager.fullname" . }}-webhook-server-cert
19 changes: 19 additions & 0 deletions e2e/plugin/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,25 @@ var _ = Describe("Plugin E2E", Ordered, func() {
err = adminClient.Update(ctx, testPluginPreset)
Expect(err).ToNot(HaveOccurred())

By("Ensure the plugin preset is updated")
Eventually(func(g Gomega) {
err = adminClient.Get(ctx, client.ObjectKeyFromObject(testPluginPreset), testPluginPreset)
Expect(err).ToNot(HaveOccurred())
Expect(testPluginPreset.Spec.ClusterOptionOverrides).To(HaveLen(1))
Expect(testPluginPreset.Spec.ClusterOptionOverrides[0].Overrides).To(HaveLen(1))
Expect(testPluginPreset.Spec.ClusterOptionOverrides[0].Overrides[0].Name).To(BeEquivalentTo("replicaCount"))
Expect(testPluginPreset.Spec.ClusterOptionOverrides[0].Overrides[0].Value).To(BeEquivalentTo(&apiextensionsv1.JSON{Raw: []byte("3")}))
}).Should(Succeed())

By("Checking the plugin status is ready")
Eventually(func(g Gomega) {
pluginList := &greenhousev1alpha1.PluginList{}
err = adminClient.List(ctx, pluginList)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(len(pluginList.Items)).To(BeEquivalentTo(1))
g.Expect(pluginList.Items[0].Status.HelmReleaseStatus.Status).To(BeEquivalentTo("deployed"))
}).Should(Succeed())

By("Check the replicas in deployment")
Eventually(func(g Gomega) {
deploymentList := &appsv1.DeploymentList{}
Expand Down

0 comments on commit 7f83726

Please sign in to comment.