Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the tini supervisor #533

Merged
merged 2 commits into from
May 24, 2023
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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ RUN xx-go build -trimpath -a -o notification-controller main.go

FROM alpine:3.18

LABEL org.opencontainers.image.source="https://github.com/fluxcd/notification-controller"
ARG TARGETPLATFORM

RUN apk add --no-cache ca-certificates tini
RUN apk --no-cache add ca-certificates \
&& update-ca-certificates

COPY --from=builder /workspace/notification-controller /usr/local/bin/

USER 65534:65534

ENTRYPOINT [ "/sbin/tini", "--", "notification-controller" ]
ENTRYPOINT ["notification-controller" ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
IMG ?= fluxcd/notification-controller:latest
# Produce CRDs that work back to Kubernetes 1.16
CRD_OPTIONS ?= crd:crdVersions=v1
SOURCE_VER ?= v1.0.0-rc.1
SOURCE_VER ?= v1.0.0-rc.3

# Repository root based on Git metadata
REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers
package controller

import (
"context"
Expand Down
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (

apiv1 "github.com/fluxcd/notification-controller/api/v1"
apiv1b2 "github.com/fluxcd/notification-controller/api/v1beta2"
"github.com/fluxcd/notification-controller/internal/controllers"
"github.com/fluxcd/notification-controller/internal/controller"
"github.com/fluxcd/notification-controller/internal/features"
"github.com/fluxcd/notification-controller/internal/server"
// +kubebuilder:scaffold:imports
Expand Down Expand Up @@ -160,34 +160,34 @@ func main() {

metricsH := helper.MustMakeMetrics(mgr)

if err = (&controllers.ProviderReconciler{
if err = (&controller.ProviderReconciler{
Client: mgr.GetClient(),
ControllerName: controllerName,
Metrics: metricsH,
EventRecorder: mgr.GetEventRecorderFor(controllerName),
}).SetupWithManagerAndOptions(mgr, controllers.ProviderReconcilerOptions{
}).SetupWithManagerAndOptions(mgr, controller.ProviderReconcilerOptions{
RateLimiter: helper.GetRateLimiter(rateLimiterOptions),
}); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Provider")
os.Exit(1)
}
if err = (&controllers.AlertReconciler{
if err = (&controller.AlertReconciler{
Client: mgr.GetClient(),
ControllerName: controllerName,
Metrics: metricsH,
EventRecorder: mgr.GetEventRecorderFor(controllerName),
}).SetupWithManagerAndOptions(mgr, controllers.AlertReconcilerOptions{
}).SetupWithManagerAndOptions(mgr, controller.AlertReconcilerOptions{
RateLimiter: helper.GetRateLimiter(rateLimiterOptions),
}); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Alert")
os.Exit(1)
}
if err = (&controllers.ReceiverReconciler{
if err = (&controller.ReceiverReconciler{
Client: mgr.GetClient(),
ControllerName: controllerName,
Metrics: metricsH,
EventRecorder: mgr.GetEventRecorderFor(controllerName),
}).SetupWithManagerAndOptions(mgr, controllers.ReceiverReconcilerOptions{
}).SetupWithManagerAndOptions(mgr, controller.ReceiverReconcilerOptions{
RateLimiter: helper.GetRateLimiter(rateLimiterOptions),
}); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Receiver")
Expand Down