Skip to content

Commit

Permalink
Remove cert-manager deps.
Browse files Browse the repository at this point in the history
Signed-off-by: d-kuro <[email protected]>
  • Loading branch information
d-kuro committed Aug 18, 2021
1 parent 713a85b commit 05bb265
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Apply cert-manager CRDs
run: kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
- name: Apply cert-manager
run: kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml

- name: Run chart-testing (install)
run: ct install --config ct.yaml
6 changes: 0 additions & 6 deletions charts/accurate/Chart.lock

This file was deleted.

6 changes: 0 additions & 6 deletions charts/accurate/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ version: 0.1.0
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.1.0

dependencies:
- name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
condition: cert-manager.enabled
2 changes: 1 addition & 1 deletion charts/accurate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ helm install --create-namespace --namespace accurate accurate accurate/accurate

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cert-manager.enabled | bool | `false` | Install cert-manager together. |
| controller.additionalRBAC.rules | list | `[]` | Specify the RBAC rules to be added to the controller. ClusterRole and ClusterRoleBinding are created with the names `{{ release name }}-additional-resources`. The rules defined here will be used for the ClusterRole rules. |
| controller.config.annotationKeys | list | `[]` | Annotations to be propagated to sub-namespaces. It is also possible to specify a glob pattern that can be interpreted by Go's "path.Match" func. |
| controller.config.labelKeys | list | `[]` | Labels to be propagated to sub-namespaces. It is also possible to specify a glob pattern that can be interpreted by Go's "path.Match" func. |
| controller.config.watches | list | `[{"group":"rbac.authorization.k8s.io","kind":"Role","version":"v1"},{"group":"rbac.authorization.k8s.io","kind":"RoleBinding","version":"v1"},{"kind":"Secret","version":"v1"}]` | List of GVK for namespace-scoped resources that can be propagated. Any namespace-scoped resource is allowed. |
| controller.extraArgs | list | `[]` | Optional additional arguments. |
| controller.replicas | int | `2` | Specify the number of replicas of the controller Pod. |
| controller.resources | object | `{"requests":{"cpu":"100m","memory":"20Mi"}}` | Specify resources. |
| controller.terminationGracePeriodSeconds | int | `10` | Specify terminationGracePeriodSeconds. |
Expand Down
2 changes: 0 additions & 2 deletions charts/accurate/ci/enable-certmanager-values.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions charts/accurate/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
{{- with .Values.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- with .Values.controller.extraArgs }}
args: {{ . }}
{{- end }}
ports:
- containerPort: 9443
name: webhook-server
Expand Down
8 changes: 3 additions & 5 deletions charts/accurate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ controller:
# controller.terminationGracePeriodSeconds -- Specify terminationGracePeriodSeconds.
terminationGracePeriodSeconds: 10

# controller.extraArgs -- Optional additional arguments.
extraArgs: []

config:
# controller.config.labelKeys -- Labels to be propagated to sub-namespaces.
# It is also possible to specify a glob pattern that can be interpreted by Go's "path.Match" func.
Expand Down Expand Up @@ -66,8 +69,3 @@ controller:
# - update
# - patch
# - delete

cert-manager:
# cert-manager.enabled -- Install cert-manager together.
## ref: https://cert-manager.io/docs/installation/kubernetes/#installing-with-helm
enabled: false
2 changes: 0 additions & 2 deletions ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@
target-branch: main
validate-maintainers: false
check-version-increment: true
chart-repos:
- jetstack=https://charts.jetstack.io
4 changes: 0 additions & 4 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ start: $(KIND) $(KUBECTL) $(HELM) $(KUBESEAL) $(KUBECTL_ACCURATE)
$(KIND) load docker-image accurate:dev --name=accurate
$(KUBECTL) apply -f https://github.com/jetstack/cert-manager/releases/download/v$(CERT_MANAGER_VERSION)/cert-manager.yaml
$(KUBECTL) -n cert-manager wait --for=condition=available --timeout=180s --all deployments
$(HELM) repo add jetstack https://charts.jetstack.io
$(HELM) repo update
$(HELM) dependency build ../charts/accurate/
$(HELM) install --create-namespace --namespace accurate accurate ../charts/accurate -f values.yaml
$(KUBECTL) -n accurate wait --for=condition=available --timeout=180s --all deployments
$(KUBECTL) apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v$(SEALED_SECRET_VERSION)/controller.yaml
$(KUBECTL) -n kube-system wait --for=condition=available --timeout=180s --all deployments
$(KUBECTL) apply -f clusterrole_for_sealedsecrets.yaml
rm -f sealed.json
$(KUBECTL) -n root2 create secret generic mysecret --dry-run=client --from-literal=foo=bar -o json | \
$(KUBESEAL) | jq '. * {metadata: {annotations: {"accurate.cybozu.com/propagate-generated": "create"}}}' > sealed.json
Expand Down
12 changes: 0 additions & 12 deletions e2e/manager_patch.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions e2e/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ image:
pullPolicy: Never

controller:
extraArgs:
- --zap-log-level=5

config:
labelKeys:
- team
Expand All @@ -20,3 +23,14 @@ controller:
kind: RoleBinding
- version: v1
kind: Secret

additionalRBAC:
rules:
- apiGroups:
- bitnami.com
resources:
- sealedsecrets
verbs:
- get
- list
- watch

0 comments on commit 05bb265

Please sign in to comment.