-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(_run): reuse kustomize across kube and single examples
update ingress-nginx image simplify kind cluster start refs ovrclk/engineering#381 refs ovrclk/engineering#356 refs ovrclk/engineering#413 Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
Showing
89 changed files
with
1,944 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,14 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: c-py/action-dotenv-to-setenv@v3 | ||
with: | ||
env-file: .env | ||
- uses: HatsuneMiku3939/direnv-action@v1 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "${{ env.GOLANG_VERSION }}" | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Prepare images | ||
run: make -s -C _run/kube kind-prepare-images | ||
- uses: engineerd/[email protected] | ||
with: | ||
version: "v${{ env.KIND_VERSION }}" | ||
|
@@ -29,7 +31,7 @@ jobs: | |
- name: Docker Status | ||
run: docker ps -a | ||
- name: Setup Ingress K8S | ||
run: make -s -C _run/kube kind-ingress-setup | ||
run: KUSTOMIZE_INSTALLS=akash-operator-inventory make -s -C _run/kube kind-cluster-setup-e2e-ci | ||
- name: k8s-ingress | ||
run: make -s -C _run/kube kind-k8s-ip | ||
- name: Kube Environment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
env: | ||
- GO111MODULE=on | ||
- DOCKER_CLI_EXPERIMENTAL="enabled" | ||
builds: | ||
- id: provider-services-linux | ||
binary: provider-services | ||
main: ./cmd/provider-services | ||
goarch: | ||
- arm64 | ||
goos: | ||
- linux | ||
flags: | ||
- "-mod={{ .Env.MOD }}" | ||
- "-tags={{ .Env.BUILD_TAGS }}" | ||
- -trimpath | ||
ldflags: | ||
- "{{ .Env.BUILD_VARS }}" | ||
- "{{ .Env.STRIP_FLAGS }}" | ||
dockers: | ||
- dockerfile: Dockerfile | ||
use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
build_flag_templates: | ||
- --platform=linux/arm64 | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url={{.GitURL}} | ||
- --label=org.opencontainers.image.source={{.GitURL}} | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
image_templates: | ||
- 'ghcr.io/ovrclk/{{ .ProjectName }}:latest-arm64' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 3 additions & 6 deletions
9
...kash-hostname-operator/kustomization.yaml → ...kash-operator-hostname/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
64 changes: 64 additions & 0 deletions
64
_docs/kustomize/akash-operator-inventory/cluster_role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: inventory-operator | ||
labels: | ||
akash.network: "true" | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
rules: | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- namespaces | ||
- nodes | ||
- pods | ||
- events | ||
- persistentvolumes | ||
- persistentvolumeclaims | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- pods/exec | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- storage.k8s.io | ||
resources: | ||
- storageclasses | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- ceph.rook.io | ||
resources: | ||
- cephclusters | ||
- cephblockpools | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- akash.network | ||
resources: | ||
- inventoryrequests | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- akash.network | ||
resources: | ||
- inventories | ||
verbs: | ||
- create | ||
- patch | ||
- get | ||
- list | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: inventory-operator | ||
namespace: akash-services | ||
labels: | ||
akash.network: "true" | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
replicas: 1 | ||
revisionHistoryLimit: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: inventory-operator | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
spec: | ||
serviceAccountName: inventory-operator | ||
containers: | ||
- name: inventory-operator | ||
image: ghcr.io/ovrclk/provider-services | ||
args: | ||
- "provider-services" | ||
- "operator" | ||
- "inventory" | ||
imagePullPolicy: IfNotPresent | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 512Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
ports: | ||
- containerPort: 8080 | ||
name: api | ||
protocol: TCP |
10 changes: 10 additions & 0 deletions
10
_docs/kustomize/akash-operator-inventory/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: akash-services | ||
resources: | ||
- deployment.yaml | ||
- service.yaml | ||
- rbac.yaml | ||
- service_account.yaml | ||
- cluster_role.yaml | ||
- role-binding.yaml |
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
_docs/kustomize/akash-operator-inventory/role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: inventory-operator | ||
labels: | ||
akash.network: "true" | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: inventory-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: inventory-operator | ||
namespace: akash-services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
akash.network: "true" | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator | ||
name: inventory-operator | ||
namespace: akash-services | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: api | ||
port: 8080 | ||
targetPort: api | ||
appProtocol: http | ||
selector: | ||
app.kubernetes.io/name: akash | ||
app.kubernetes.io/instance: inventory | ||
app.kubernetes.io/component: operator |
Oops, something went wrong.