Skip to content

Commit

Permalink
fix: compatibility with kubernetes 1.22 (#827)
Browse files Browse the repository at this point in the history
* fix kubernetes api version

* fix error

* migrate other steps

according to https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122

* beta migration

* update to higher kubernetes version comatibility

* Restyled by prettier (#828)

Co-authored-by: Restyled.io <[email protected]>

* Update Phonebook.pr.yml for Azure Pipelines

* update pipeline vm specifiers

* Update demo/Phonebook.MockBackend.yml

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2022
1 parent 76a6de0 commit 9881db9
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 28 deletions.
10 changes: 5 additions & 5 deletions .azure/pipelines/Phonebook.preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- job: build_phonebook_frontend
displayName: 'Phonebook Frontend'
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand All @@ -40,7 +40,7 @@ jobs:
- job: build_phonebook_source_peoplesoft
displayName: 'Phonebook Source Peoplesoft'
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand All @@ -63,7 +63,7 @@ jobs:
- job: build_phonebook_helm
displayName: Phonebook Helm Chart
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: HelmInstaller@1
displayName: Helm install latest
Expand All @@ -86,7 +86,7 @@ jobs:
- build_phonebook_helm
displayName: 'Deploy Preview'
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
variables:
namespace: $(image_tag_frontend)
steps:
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
condition: succeededOrFailed()
displayName: 'Delete Preview Environment'
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
variables:
namespace: $(image_tag_frontend)
steps:
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/pr/Phonebook.Assets.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build .
Expand Down
6 changes: 3 additions & 3 deletions .azure/pipelines/pr/Phonebook.Frontend.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: E2E
displayName: E2E Tests
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand All @@ -33,7 +33,7 @@ jobs:
- job: Unit
displayName: Unit Tests
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand All @@ -55,7 +55,7 @@ jobs:
- job: build
displayName: Build
pool:
vmImage: 'Ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build -f synthetic.Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/pr/Phonebook.Source.PeopleSoft.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build .
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/pr/Phonebook.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: helm
displayName: helm
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: HelmInstaller@1
displayName: Helm install latest
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/pr/docs.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: build
displayName: build docs
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseRubyVersion@0
displayName: 'Use Ruby >= 2.5'
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/production/Phonebook.Assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build -t $dockerRepo:$tag .
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/production/Phonebook.Frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trigger:
pr: none

pool:
vmImage: 'Ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: UseNode@1
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build -t $dockerRepo:$tag -f synthetic.Dockerfile .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- job: build
displayName: build docker image
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- bash: |
docker build -t $dockerRepo:$tag -t $dockerRepo:latest .
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/production/Phonebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- job: helm
displayName: helm
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- task: HelmInstaller@1
displayName: Install Helm latest
Expand Down
6 changes: 3 additions & 3 deletions Phonebook/phonebook/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: traefik
repository: https://helm.traefik.io/traefik
version: 9.4.3
digest: sha256:fd64faa165f4cd75bce09c96fd7e5c0222fde2427ace15ce144e32bc452869f3
generated: "2020-10-11T21:50:24.9918945+02:00"
version: 10.19.4
digest: sha256:44bbac96c43c0f9199601bc75c76bb6470822996e6abff3b85323d94934c91f5
generated: "2022-04-25T15:41:54.906223332Z"
2 changes: 1 addition & 1 deletion Phonebook/phonebook/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: traefik
condition: traefik.enabled
version: 9.4.3
version: 10.19.4
appVersion: 2.3.1
repository: https://helm.traefik.io/traefik

9 changes: 6 additions & 3 deletions demo/Phonebook.Assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
selector:
app: phonebook-assets
---
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: phonebook-assets-ingress
Expand All @@ -53,6 +53,9 @@ spec:
- http:
paths:
- path: /assets
pathType: Prefix
backend:
serviceName: phonebook-assets-service
servicePort: http
service:
name: phonebook-assets-service
port:
name: http
9 changes: 6 additions & 3 deletions demo/Phonebook.MockBackend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
selector:
app: phonebook-mock-backend
---
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: phonebook-mock-backend-ingress
Expand All @@ -53,6 +53,9 @@ spec:
- http:
paths:
- path: /api
pathType: Prefix
backend:
serviceName: phonebook-mock-backend-service
servicePort: http
service:
name: phonebook-mock-backend-service
port:
name: http

0 comments on commit 9881db9

Please sign in to comment.