Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add permissions for roles to support openshift policies #866

Closed
wants to merge 87 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ba1d17e
update manifests
LuciferInLove Aug 10, 2022
914f8b7
update build scripts
LuciferInLove Aug 10, 2022
0391c2b
bump envtest version
LuciferInLove Aug 10, 2022
0b1e3cb
update smaple CRs
LuciferInLove Aug 10, 2022
9d72b92
fix version in Makefile
LuciferInLove Aug 10, 2022
cffb0f2
fixup_structs was removed in istio api repo
LuciferInLove Aug 10, 2022
1cebcff
update resource dump tests
LuciferInLove Aug 10, 2022
eb7b9c0
update CRDs and readme
LuciferInLove Aug 10, 2022
a649cd1
update generated CRDs
LuciferInLove Aug 10, 2022
5c64fc4
update image version validation logic
LuciferInLove Aug 10, 2022
06bef77
bump operator chart version
LuciferInLove Aug 10, 2022
fb6ef44
update container images version to 1.15.0-beta.0
LuciferInLove Aug 11, 2022
398e5eb
workaround for istio 38217 issue
LuciferInLove Aug 11, 2022
9cd7ab9
syncronize manifests with upstream
LuciferInLove Aug 11, 2022
e5ccc8a
rebuild api
LuciferInLove Aug 15, 2022
b4510fa
Fix gateway's protocol letter-case to be uppercase
LuciferInLove Aug 15, 2022
f9cebb7
fix passive cluster tests
LuciferInLove Aug 15, 2022
d7de7a8
update libs and deps
LuciferInLove Aug 23, 2022
a7cc050
bump istio version to 1.15.0-beta.1
LuciferInLove Aug 23, 2022
2049490
update api generation scripts
LuciferInLove Aug 23, 2022
50a93fb
migrate api from gogo/protobuf to golang/protobuf
LuciferInLove Aug 23, 2022
5248a6b
add new api support to controllers
LuciferInLove Aug 23, 2022
f2bb382
fix copylocks in Statuses
LuciferInLove Aug 25, 2022
96d8d65
fix golangci-lint errors
LuciferInLove Aug 25, 2022
bc11164
updated protoc-gen-go
LuciferInLove Aug 26, 2022
0097623
updated protoc-gen-go
LuciferInLove Aug 26, 2022
7cec36c
get rid of gogo/protobuf
LuciferInLove Aug 26, 2022
3a5e8da
fix copylocks in MeshConfig
LuciferInLove Aug 26, 2022
66f0b3e
allow local replacements in golangci-lint
LuciferInLove Aug 26, 2022
6a510d8
goimport fixes
LuciferInLove Aug 26, 2022
2cfa78e
review fixes, bump istio version, bump policy api version
LuciferInLove Aug 30, 2022
34d2992
set rc.0 version
LuciferInLove Aug 30, 2022
4e36bf3
change supported k8s versions
LuciferInLove Aug 30, 2022
1a303fc
Trigger circleci
asdwsda Aug 31, 2022
a1ae694
Merge pull request #860 from banzaicloud/banzaicloud/1.15-initial
LuciferInLove Aug 31, 2022
a1d86f5
bump the chart's version
LuciferInLove Aug 31, 2022
305e196
Merge pull request #862 from banzaicloud/bump_chart_version
LuciferInLove Aug 31, 2022
96d0f8d
restore deleted methods
LuciferInLove Sep 1, 2022
2b44475
Merge pull request #863 from banzaicloud/fix_deleted_methods
LuciferInLove Sep 1, 2022
d9abad8
bump istio version
LuciferInLove Sep 1, 2022
6735b03
Merge pull request #864 from banzaicloud/bump_istio_version
LuciferInLove Sep 1, 2022
52167d3
bump operator's version
LuciferInLove Sep 1, 2022
b03de4d
Merge branch 'release-1.15' into bump_istio_version
LuciferInLove Sep 1, 2022
45eb10e
Merge pull request #865 from banzaicloud/bump_istio_version
LuciferInLove Sep 1, 2022
e457673
Fix helm lib security issue
Laci21 Sep 2, 2022
e2b1193
Merge pull request #867 from banzaicloud/fix-helm-security-issue
Laci21 Sep 5, 2022
ccae9f3
add a protobuf fork for int64/uint64 as int marshaling support
LuciferInLove Sep 13, 2022
56050c6
go mod tidy
LuciferInLove Sep 13, 2022
6675058
update build tools to add Int64Uint64asIntegers option
LuciferInLove Sep 14, 2022
ae545f7
bump versions to release
LuciferInLove Sep 14, 2022
cd809ab
Merge pull request #868 from banzaicloud/protobuf_fork
LuciferInLove Sep 14, 2022
db8f155
Updated cluster_secret.go to support k8s 1.24
Kuvesz Oct 12, 2022
65578a0
Merge pull request #869 from banzaicloud/fix_for_k8s_124
Kuvesz Oct 12, 2022
e3f6827
Bump versions for new tags
Kuvesz Oct 12, 2022
4e8d22e
Changed versioning to refelct conventions
Kuvesz Oct 12, 2022
a6333ef
Merge pull request #870 from banzaicloud/bump_versions
Kuvesz Oct 13, 2022
04a22c7
bump istio version to 1.15.2
LuciferInLove Oct 18, 2022
29f651d
fix license header
LuciferInLove Oct 18, 2022
9d357fe
Merge pull request #871 from banzaicloud/bump_istio_to_1_15_2
LuciferInLove Oct 18, 2022
0cc9413
Update webhookcainjection_patch.yaml
Kuvesz Oct 27, 2022
9439c56
Update cainjection_in_istiomeshgateways.yaml
Kuvesz Oct 27, 2022
9b4d650
Update cainjection_in_istiomeshes.yaml
Kuvesz Oct 27, 2022
ddaee48
Update cainjection_in_istiocontrolplanes.yaml
Kuvesz Oct 27, 2022
a4bb4d7
Update webhook_in_istiomeshgateways.yaml
Kuvesz Oct 27, 2022
2b88990
Update webhook_in_istiomeshes.yaml
Kuvesz Oct 27, 2022
6b17e7e
Update webhook_in_istiocontrolplanes.yaml
Kuvesz Oct 27, 2022
b4b0562
bump istio version to 1.15.3
LuciferInLove Nov 2, 2022
38a131e
update version in Readme and values
LuciferInLove Nov 2, 2022
65a5524
Merge pull request #875 from banzaicloud/bump_istio_to_1_15_3
LuciferInLove Nov 2, 2022
af479cd
Merge branch 'release-1.15' into update-deprecated-apis
Kuvesz Dec 5, 2022
1cc4146
Merge pull request #874 from banzaicloud/update-deprecated-apis
Kuvesz Dec 9, 2022
e60bb40
Small fixes in README.md
Laci21 Dec 14, 2022
a01ff47
Add Istio operator vs Calisti comparison doc
Laci21 Dec 14, 2022
08f77aa
Merge pull request #877 from banzaicloud/doc/calisti-comparison
Laci21 Dec 15, 2022
1f1776a
add custom sidecar template feature
kristofgyuracz Oct 19, 2022
2e6b270
revert go mod rearrange
kristofgyuracz Oct 19, 2022
db6e5a0
enable multiple custom templates
kristofgyuracz Jan 5, 2023
acc4330
custom template for gw
kristofgyuracz Jan 6, 2023
c32a9af
fix test cr
kristofgyuracz Jan 6, 2023
f6109ad
simplify template
kristofgyuracz Jan 6, 2023
df8a830
update API docs
kristofgyuracz Jan 6, 2023
17b17e9
expand api docs
kristofgyuracz Jan 6, 2023
90278b7
Merge pull request #872 from banzaicloud/custom-sidecar
kristofgyuracz Jan 8, 2023
ea70118
add roles to support openshift policies
kristofgyuracz Sep 1, 2022
403488f
restrict permissions
kristofgyuracz Sep 1, 2022
02531e3
add demo manifests
kristofgyuracz Sep 5, 2022
9e2fe48
Add OpenShift related roles to charts
Laci21 Sep 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
custom template for gw
  • Loading branch information
kristofgyuracz committed Jan 6, 2023
commit acc43300bcc801b700700c232584841c90539f61
7 changes: 0 additions & 7 deletions api/v1alpha1/istiocontrolplane.gen.json
Original file line number Diff line number Diff line change
Expand Up @@ -2774,13 +2774,6 @@
},
"templates": {
"$ref": "#/components/schemas/istio_operator.v2.api.v1alpha1.SidecarInjectionTemplates"
},
"defaultSidecarTemplates": {
"description": "Default templates to be injected",
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down
776 changes: 382 additions & 394 deletions api/v1alpha1/istiocontrolplane.pb.go

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions api/v1alpha1/istiocontrolplane.pb.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,6 @@ <h2 id="SidecarInjectorConfiguration">SidecarInjectorConfiguration</h2>
<td>
<p>SidecarInjectionTemplates spec</p>

</td>
<td>
No
</td>
</tr>
<tr id="SidecarInjectorConfiguration-defaultSidecarTemplates">
<td><code>defaultSidecarTemplates</code></td>
<td><code>string[]</code></td>
<td>
<p>Default templates to be injected</p>

</td>
<td>
No
Expand Down
2 changes: 0 additions & 2 deletions api/v1alpha1/istiocontrolplane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ message SidecarInjectorConfiguration {
Service service = 2;
// SidecarInjectionTemplates spec
SidecarInjectionTemplates templates = 3;
// Default templates to be injected
repeated string defaultSidecarTemplates = 4;
}

message SidecarInjectionTemplates {
Expand Down
8 changes: 0 additions & 8 deletions config/crd/bases/istio-operator-crds.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6302,10 +6302,6 @@ spec:
type: object
sidecarInjector:
properties:
defaultSidecarTemplates:
items:
type: string
type: array
deployment:
properties:
affinity:
Expand Down Expand Up @@ -15346,10 +15342,6 @@ spec:
type: object
sidecarInjector:
properties:
defaultSidecarTemplates:
items:
type: string
type: array
deployment:
properties:
affinity:
Expand Down
7 changes: 6 additions & 1 deletion controllers/meshgateway_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ func (r *IstioMeshGatewayReconciler) Reconcile(ctx context.Context, req ctrl.Req
generateExternalService = true
}

injectionTemplate := "gateway"
if icp.GetSpec().GetSidecarInjector().GetTemplates().GetGateway() != "" {
injectionTemplate = "gateway, gatewayOverrides"
}

reconciler, err := NewComponentReconciler(r, func(helmReconciler *components.HelmReconciler) components.ComponentReconciler {
return istiomeshgateway.NewChartReconciler(helmReconciler, servicemeshv1alpha1.IstioMeshGatewayProperties{
Revision: fmt.Sprintf("%s.%s", icp.GetName(), icp.GetNamespace()),
EnablePrometheusMerge: utils.BoolPointer(enablePrometheusMerge),
InjectionTemplate: "gateway, gatewayOverrides",
InjectionTemplate: injectionTemplate,
InjectionChecksum: icp.GetStatus().GetChecksums().GetSidecarInjector(),
MeshConfigChecksum: icp.GetStatus().GetChecksums().GetMeshConfig(),
IstioControlPlane: icp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6302,10 +6302,6 @@ spec:
type: object
sidecarInjector:
properties:
defaultSidecarTemplates:
items:
type: string
type: array
deployment:
properties:
affinity:
Expand Down Expand Up @@ -15346,10 +15342,6 @@ spec:
type: object
sidecarInjector:
properties:
defaultSidecarTemplates:
items:
type: string
type: array
deployment:
properties:
affinity:
Expand Down
4 changes: 1 addition & 3 deletions internal/assets/manifests/istio-discovery/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ sidecarInjectorWebhook:
{{ valueIf (dict "key" $customTemplate.Name "value" $customTemplate.Template) | indent 4 }}
{{ end }}
{{- end }}
{{- if .GetSpec.GetSidecarInjector.GetDefaultSidecarTemplates }}
{{ toYamlIf (dict "key" "defaultTemplates" "value" .GetSpec.GetSidecarInjector.GetDefaultSidecarTemplates) | indent 2 }}
{{- else if and (not .GetSpec.GetSidecarInjector.GetDefaultSidecarTemplates) .GetSpec.GetSidecarInjector.GetTemplates.GetSidecar }}
{{- if .GetSpec.GetSidecarInjector.GetTemplates.GetSidecar }}
defaultTemplates:
- sidecar
- sidecarOverrides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ data:
defaultTemplates:
- sidecar
- sidecarOverrides
- custom1
policy: enabled
httpProxyEnvs:
noProxy: localhost
Expand Down Expand Up @@ -1404,8 +1403,7 @@ data:
"alwaysInjectSelector": [],
"defaultTemplates": [
"sidecar",
"sidecarOverrides",
"custom1"
"sidecarOverrides"
],
"enableNamespacesByDefault": false,
"httpProxyEnvs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ telemetry:
prometheus:
wasmEnabled: false
sidecarInjectorWebhook:
defaultTemplates: [ sidecar, sidecarOverrides, custom1 ]
defaultTemplates: [ sidecar, sidecarOverrides ]
templates:
custom1: |
spec:
Expand Down
173 changes: 0 additions & 173 deletions internal/components/discovery/testdata/icp-test-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ metadata:
namespace: istio-system
spec:
sidecarInjector:
defaultSidecarTemplates:
- sidecar
- sidecarOverrides
- custom1
templates:
sidecar: |
spec:
Expand Down Expand Up @@ -46,172 +42,3 @@ spec:
version: "1.15.3"
mode: ACTIVE
networkName: network1
containerImageConfiguration:
hub: gcr.io/istio-testing
tag: latest
imagePullPolicy: Never
imagePullSecrets:
- name: pullsecret-1
- name: pullsecret-2
logging:
level: "default:warning"
mountMtlsCerts: false
istiod:
deployment:
metadata:
annotations:
testannotation.banzaicloud.io/name: "value"
labels:
testlabel.banzaicloud.io/name: "value"
image: container-hub/image-name:tag
volumes:
- name: "dddemo"
volumeSource:
secret:
secretName: "ssname"
optional: true
- name: config-vol
volumeSource:
configMap:
localObjectReference:
name: log-config
items:
- key: log_level
path: log_level
volumeMounts:
- name: config-vol
mountPath: /etc/config
env:
- name: TEST_ENV
value: test-env-value
resources:
limits:
cpu: "2"
memory: 1Gi
requests:
cpu: 100m
memory: 128Mi
nodeSelector:
disktype: ssd
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S1
topologyKey: topology.kubernetes.io/zone
podSecurityContext:
runAsUser: 1337
securityContext:
runAsUser: 1337
runAsGroup: 1337
runAsNonRoot: true
imagePullPolicy: Never
imagePullSecrets:
- name: pullsecret-1
- name: pullsecret-2
priorityClassName: "high-priority"
tolerations:
- key: "key1"
operator: "Equal"
value: "value1"
effect: "NoSchedule"
tolerationSeconds: 5
replicas:
count: 1
min: 1
max: 5
targetCPUUtilizationPercentage: 80
podMetadata:
annotations:
podannotation: podannotationvalue
labels:
podlabel: podlabelvalue
podDisruptionBudget:
minAvailable: 1
maxUnavailable: 5
deploymentStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 30%
maxSurge: 100%
enableAnalysis: false
enableStatus: true
externalIstiod:
enabled: false
traceSampling: 0.5
enableProtocolSniffingOutbound: false
enableProtocolSniffingInbound: false
certProvider: ISTIOD
proxy:
image: proxyv2
privileged: false
enableCoreDump: false
logLevel: WARNING
componentLogLevel: "misc:debug"
clusterDomain: "acme.corp"
holdApplicationUntilProxyStarts: true
lifecycle:
postStart:
exec:
command:
- pilot-agent
- wait
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
includeIPRanges: "*"
excludeIPRanges: ""
excludeInboundPorts: ""
excludeOutboundPorts: ""
proxyInit:
cni:
enabled: true
image: proxyv2
resources:
limits:
cpu: 100m
memory: 64Mi
requests:
cpu: 50m
memory: 32Mi
telemetryV2:
enabled: true
sds:
tokenAudience: "istio-ca"
proxyWasm:
enabled: false
watchOneNamespace: false
jwtPolicy: THIRD_PARTY_JWT
caAddress: localhost
caProvider: Citadel
distribution: cisco
httpProxyEnvs:
noProxy: "localhost"
meshConfig:
rootNamespace: "istio-system"
caCertificates:
- pem: "<pem content>"
k8sResourceOverlays:
- groupVersionKind:
kind: Deployment
patches:
- type: replace
path: /metadata?/labels?/label-added-by-overlay-patch?
value: "true"