Skip to content

Conversation

@prakarsh-dt
Copy link
Collaborator

@prakarsh-dt prakarsh-dt commented Nov 18, 2021

Description

This PR resolves most k8s 1.22 compatibility issues.

Fixes #870
Fixes #869
Fixes #843
Fixes #850

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested on various versions of K8s up to k8s 1.22

  • Tested by installing the stack on various versions of k8s up to k8s 1.22
  • Tested by deploying apps on versions of k8s up to k8s 1.22

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have tested it for all user roles

https://github.com/devtron-labs/silver-surfer has been very helpful in identifying the objects that needed upgrade for making them compatible to kubernetes 1.22

dheeth and others added 30 commits November 11, 2021 11:07
* Changed grafana datasource name and removed Prometheus datasource

* Added chart 4.10 for deployment template

* Added new features on chart 4.10

* Added migrations for chart 4.10

* Updated Micro-Services for 1.22

* Changed LTAG for testing

Co-authored-by: Pawan Kumar <[email protected]>
Co-authored-by: Prakarsh <[email protected]>
- Also removed nats-operator dependency
* Added chart for 4.10.0 version

* updated chart version

* updated ingress.yaml

* updated apiversion of PodDisruptionBudget

* updated ingress.yaml as pathType is required field

* updated hpa spec

* updated chart.yaml

* Added Environment vlariable fieldRef/fieldPath support

* Added initcontainer resources support

* Added k8s 1.22 compatible chart changes

Co-authored-by: pawan-59 <[email protected]>
- HPA Documentation updated
- Ingress Documentation updated
- Updated the ingress section with new format 
- Updated the ingress legacy format
grafanaPassword = jsonSelect(operatorSecret, "data.GRAFANA_PASSWORD");
azureAccountKey = jsonSelect(operatorSecret, "data.AZURE_ACCOUNT_KEY");
postgresSecret = kubectl get secret -n devtroncd postgresql-postgresql;
enableLegacyApi = jsonSelect(operatorConfigMap, "data.ENABLE_LEGACY_API");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be introducing flags specific to k8s version so that in future we can support multiple version compatibility

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be more intuitive for users also

@@ -0,0 +1,19 @@
apiVersion: extensions/v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a specific documentation section for ingress setup

@@ -1,6 +1,9 @@
{{- if $.Values.autoscaling.enabled }}
---
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its good practice to write logic in utils and treat apiVersion as variable in template

@Linutux
Copy link

Linutux commented Nov 20, 2021

Thanks for investing time in this! I use K8S 1.22 and egearly await the release of this patch.

@pghildiyal pghildiyal merged commit 36a6e74 into main Nov 20, 2021
@pghildiyal pghildiyal deleted the k8s-1.22-compatibility branch November 20, 2021 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Devtron stack compatible with k8s 1.22 New chart for Deployment on k8s 1.22 Support new CRD api in v1.22 NATS compatibility for k8s 1.22

6 participants