-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
85 lines (65 loc) · 2.29 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
NAMESPACE ?= tailing-sidecar-system
RELEASE ?= tailing-sidecar
HELM_CHART ?= helm/tailing-sidecar-operator
KUTTL_CONFIG ?= kuttl-test.yaml
TAILING_SIDECAR ?= fluentbit
all: markdownlint yamllint
markdownlint: mdl
mdl:
mdl --style .markdownlint/style.rb \
README.md \
sidecar/fluentbit/README.md \
operator/README.md \
docs/*.md
yamllint:
yamllint -c .yamllint.yaml \
operator/examples/
login-ecr:
aws ecr-public get-login-password --region us-east-1 \
| docker login --username AWS --password-stdin $(ECR_URL)
.PHONY: e2e
e2e: IMG="registry.localhost:5000/sumologic/tailing-sidecar-operator:test"
e2e: TAILING_SIDECAR_IMG = "registry.localhost:5000/sumologic/sidecar:test"
e2e:
$(MAKE) -C ./sidecar/$(TAILING_SIDECAR) build-test-image TAG=$(TAILING_SIDECAR_IMG)
$(MAKE) -C ./operator docker-build IMG=$(IMG) TAILING_SIDECAR_IMG=$(TAILING_SIDECAR_IMG)
kubectl-kuttl test --config $(KUTTL_CONFIG)
.PHONY: e2e-helm
e2e-helm: KUTTL_CONFIG = kuttl-test-helm.yaml
e2e-helm: e2e
.PHONY: e2e-helm-certmanager
e2e-helm-certmanager: KUTTL_CONFIG = kuttl-test-helm-certmanager.yaml
e2e-helm-certmanager: e2e
.PHONY: e2e-helm-custom-configuration
e2e-helm-custom-configuration: KUTTL_CONFIG = kuttl-test-helm-$(TAILING_SIDECAR)-custom-configuration.yaml
e2e-helm-custom-configuration: e2e
# We sleep for 10 seconds here because webhooks can mysteriously be unavailable even though the readiness check passes
.PHONY: e2e-wait-until-operator-ready
e2e-wait-until-operator-ready:
kubectl wait --for=condition=available --timeout 300s deploy --all -n tailing-sidecar-system
kubectl wait --for=condition=ready --timeout 300s pod --all -n tailing-sidecar-system
sleep 10
build-push-deploy: build-push-sidecar build-push-deploy-operator
build-push-sidecar:
$(MAKE) -C sidecar all
build-push-deploy-operator:
$(MAKE) -C operator all
push-helm-chart:
./ci/push-helm-chart.sh
helm-upgrade:
helm upgrade --install $(RELEASE) \
--namespace $(NAMESPACE) \
--create-namespace \
$(HELM_CHART)
helm-dry-run:
helm install --dry-run $(RELEASE) \
--namespace $(NAMESPACE) \
$(HELM_CHART)
helm-delete:
helm delete $(RELEASE) --namespace $(NAMESPACE)
deploy-examples:
$(MAKE) -C operator deploy-examples
check-examples:
$(MAKE) -C operator check-examples
teardown-examples:
$(MAKE) -C operator teardown-examples